From 3b6e52ddc838e207930606cbc69cf1a5fcc4a528 Mon Sep 17 00:00:00 2001 From: Mark Zegarelli Date: Tue, 5 Sep 2023 09:30:47 -0700 Subject: [PATCH 01/12] Init --- overrides/main.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/overrides/main.html b/overrides/main.html index 75cc87c73..86cdbfc22 100644 --- a/overrides/main.html +++ b/overrides/main.html @@ -3,4 +3,6 @@ {% block site_meta %} {{super()}} -{% endblock %} \ No newline at end of file +{% endblock %} + + \ No newline at end of file From db4f3538400e55ba2850cbc0ce5666babd365d35 Mon Sep 17 00:00:00 2001 From: Mark Zegarelli Date: Tue, 5 Sep 2023 11:07:49 -0700 Subject: [PATCH 02/12] Install Kapa --- docs/javascripts/init-kapa-widget.js | 10 ++++++++++ mkdocs.yml | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 docs/javascripts/init-kapa-widget.js diff --git a/docs/javascripts/init-kapa-widget.js b/docs/javascripts/init-kapa-widget.js new file mode 100644 index 000000000..a31fc2ebd --- /dev/null +++ b/docs/javascripts/init-kapa-widget.js @@ -0,0 +1,10 @@ +document.addEventListener("DOMContentLoaded", function () { + var script = document.createElement("script"); + script.src = "https://widget.kapa.ai/kapa-widget.bundle.js"; + script.setAttribute("data-website-id", "ad8ecaa4-5c43-413b-9d0a-8114b6e1f831"); + script.setAttribute("data-project-name", "Amplitude"); + script.setAttribute("data-project-color", "#301661"); + script.setAttribute("data-project-logo", "https://avatars.githubusercontent.com/u/2291562?s=280&v=4"); + script.async = true; + document.head.appendChild(script); + }); \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 77a9dbb56..338856942 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -62,6 +62,8 @@ extra_javascript: - /javascripts/tablesort.js #script for Tablesort feature - /javascripts/anchor-copy.js #script for copying anchor links - /javascripts/statuspage.js #script for status page embed + - https://widget.kapa.ai/kapa-widget.bundle.js + - /javascripts/init_kapa_widget.js # Plugins # When you add a plugin here, make sure the change is updated in insiders.mkdocs.yml and insiders.local.build.yml too. From 147c3e42c3d106156365c0586bd0b54711d45224 Mon Sep 17 00:00:00 2001 From: Mark Zegarelli Date: Tue, 5 Sep 2023 11:20:19 -0700 Subject: [PATCH 03/12] fix js include --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 338856942..30d3e77f4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -63,7 +63,7 @@ extra_javascript: - /javascripts/anchor-copy.js #script for copying anchor links - /javascripts/statuspage.js #script for status page embed - https://widget.kapa.ai/kapa-widget.bundle.js - - /javascripts/init_kapa_widget.js + - /javascripts/init-kapa-widget.js # Plugins # When you add a plugin here, make sure the change is updated in insiders.mkdocs.yml and insiders.local.build.yml too. From e0cfebfad6bbfc27e6d7aa8be811ab54f86b1d0b Mon Sep 17 00:00:00 2001 From: Mark Zegarelli Date: Tue, 5 Sep 2023 12:38:06 -0700 Subject: [PATCH 04/12] Add kapa script directly --- docs/javascripts/init-kapa-widget.js | 20 ++++++++++---------- overrides/home.html | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/docs/javascripts/init-kapa-widget.js b/docs/javascripts/init-kapa-widget.js index a31fc2ebd..b4df2d075 100644 --- a/docs/javascripts/init-kapa-widget.js +++ b/docs/javascripts/init-kapa-widget.js @@ -1,10 +1,10 @@ -document.addEventListener("DOMContentLoaded", function () { - var script = document.createElement("script"); - script.src = "https://widget.kapa.ai/kapa-widget.bundle.js"; - script.setAttribute("data-website-id", "ad8ecaa4-5c43-413b-9d0a-8114b6e1f831"); - script.setAttribute("data-project-name", "Amplitude"); - script.setAttribute("data-project-color", "#301661"); - script.setAttribute("data-project-logo", "https://avatars.githubusercontent.com/u/2291562?s=280&v=4"); - script.async = true; - document.head.appendChild(script); - }); \ No newline at end of file +// document.addEventListener("DOMContentLoaded", function () { +// var script = document.createElement("script"); +// script.src = "https://widget.kapa.ai/kapa-widget.bundle.js"; +// script.setAttribute("data-website-id", "ad8ecaa4-5c43-413b-9d0a-8114b6e1f831"); +// script.setAttribute("data-project-name", "Amplitude"); +// script.setAttribute("data-project-color", "#301661"); +// script.setAttribute("data-project-logo", "https://avatars.githubusercontent.com/u/2291562?s=280&v=4"); +// script.async = true; +// document.head.appendChild(script); +// }); \ No newline at end of file diff --git a/overrides/home.html b/overrides/home.html index 5e65fca3c..2733691ca 100644 --- a/overrides/home.html +++ b/overrides/home.html @@ -199,4 +199,23 @@

Welcome to the Amplitude Developer center

{% endblock %} {% block content %} {{ page.content }} +{% endblock %} + + +{% block scripts %} + +{{ super() }} + + {% endblock %} \ No newline at end of file From 18d3eab5aa63afb7e0a6d67377d9a3ea1f8726a5 Mon Sep 17 00:00:00 2001 From: Mark Zegarelli Date: Tue, 5 Sep 2023 15:10:19 -0700 Subject: [PATCH 05/12] don't call script twice --- docs/guides/index.md | 4 ++-- mkdocs.yml | 2 -- overrides/home.html | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/guides/index.md b/docs/guides/index.md index fb7d00e9c..41f71607c 100644 --- a/docs/guides/index.md +++ b/docs/guides/index.md @@ -25,7 +25,7 @@ Getting started with Amplitude can be daunting. These guides break down sophisti Learn about best practices for instrumenting the Accounts add on. - [:octicons-arrow-right-24: Read the guide](../guides/accounts-instrumentation-guide) + [:octicons-arrow-right-24: Read the guide](../guides/accounts-instrumentation-guide/) - :material-key:{ .lg .middle } __Amplitude tokens and keys__ @@ -33,7 +33,7 @@ Getting started with Amplitude can be daunting. These guides break down sophisti Learn all about Amplitude's tokens and keys. - [:octicons-arrow-right-24: Read the guide](../guides/amplitude-keys-guide) + [:octicons-arrow-right-24: Read the guide](../guides/amplitude-keys-guide/) - :material-file-import-outline:{ .lg .middle } __Import historical data__ diff --git a/mkdocs.yml b/mkdocs.yml index 30d3e77f4..77a9dbb56 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -62,8 +62,6 @@ extra_javascript: - /javascripts/tablesort.js #script for Tablesort feature - /javascripts/anchor-copy.js #script for copying anchor links - /javascripts/statuspage.js #script for status page embed - - https://widget.kapa.ai/kapa-widget.bundle.js - - /javascripts/init-kapa-widget.js # Plugins # When you add a plugin here, make sure the change is updated in insiders.mkdocs.yml and insiders.local.build.yml too. diff --git a/overrides/home.html b/overrides/home.html index 2733691ca..8eda81082 100644 --- a/overrides/home.html +++ b/overrides/home.html @@ -202,13 +202,13 @@

Welcome to the Amplitude Developer center

{% endblock %} -{% block scripts %} +{% block libs %} {{ super() }} - -{% endblock %} \ No newline at end of file diff --git a/overrides/main.html b/overrides/main.html index 86cdbfc22..95be960d7 100644 --- a/overrides/main.html +++ b/overrides/main.html @@ -5,4 +5,21 @@ {% endblock %} - \ No newline at end of file + +{% block libs %} + +{{ super() }} + + +{% endblock %} \ No newline at end of file From bae44abe1c197244cb82c3ab33ca2f77bf470e81 Mon Sep 17 00:00:00 2001 From: Mark Zegarelli Date: Thu, 14 Sep 2023 14:46:10 -0700 Subject: [PATCH 07/12] Experiment --- overrides/main.html | 80 ++++++++++++++++--- .../integrations/analytics/amplitude.html | 2 + 2 files changed, 72 insertions(+), 10 deletions(-) diff --git a/overrides/main.html b/overrides/main.html index 95be960d7..f74b280f8 100644 --- a/overrides/main.html +++ b/overrides/main.html @@ -9,17 +9,77 @@ {% block libs %} {{ super() }} + + {% endblock %} \ No newline at end of file diff --git a/overrides/partials/integrations/analytics/amplitude.html b/overrides/partials/integrations/analytics/amplitude.html index 5a543a315..ba850e600 100644 --- a/overrides/partials/integrations/analytics/amplitude.html +++ b/overrides/partials/integrations/analytics/amplitude.html @@ -1,6 +1,8 @@ {% endblock %} \ No newline at end of file diff --git a/overrides/partials/integrations/analytics/amplitude.html b/overrides/partials/integrations/analytics/amplitude.html index ba850e600..d6729640e 100644 --- a/overrides/partials/integrations/analytics/amplitude.html +++ b/overrides/partials/integrations/analytics/amplitude.html @@ -1,7 +1,7 @@