From 3744cb661e6db324f274b54c2f4556c5cce2cc95 Mon Sep 17 00:00:00 2001 From: Kristopher Overholt Date: Thu, 29 Jan 2026 16:11:39 -0600 Subject: [PATCH 1/6] Add button to copy page as Markdown to clipboard --- docs/stylesheets/custom.css | 12 ++++++++++++ overrides/partials/actions.html | 23 +++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 overrides/partials/actions.html diff --git a/docs/stylesheets/custom.css b/docs/stylesheets/custom.css index 9b82f43b9..35dc4a1f7 100644 --- a/docs/stylesheets/custom.css +++ b/docs/stylesheets/custom.css @@ -78,6 +78,18 @@ width: 100%; } +/* Copy page button */ + +button.md-content__button { + background: none; + border: none; + cursor: pointer; +} + +button.md-content__button:hover svg { + color: var(--md-accent-fg-color); +} + /* YouTube video grid */ .video-grid { diff --git a/overrides/partials/actions.html b/overrides/partials/actions.html new file mode 100644 index 000000000..41f897ed4 --- /dev/null +++ b/overrides/partials/actions.html @@ -0,0 +1,23 @@ +{% if page.edit_url and page.file.src_path != "index.md" %} + {% if "content.action.edit" in features %} + + {% set icon = config.theme.icon.edit or "material/file-edit-outline" %} + {% include ".icons/" ~ icon ~ ".svg" %} + + {% endif %} + {% if "content.action.view" in features %} + {% if "/blob/" in page.edit_url %} + {% set part = "blob" %} + {% else %} + {% set part = "edit" %} + {% endif %} + + {% set icon = config.theme.icon.view or "material/file-eye-outline" %} + {% include ".icons/" ~ icon ~ ".svg" %} + + {% endif %} + {% set raw_url = page.edit_url | replace("github.com", "raw.githubusercontent.com") | replace("/edit/", "/") %} + +{% endif %} From d74f842df4055f6f27744d28bf4322b6d66dca62 Mon Sep 17 00:00:00 2001 From: Kristopher Overholt Date: Thu, 29 Jan 2026 16:23:05 -0600 Subject: [PATCH 2/6] Move copy button JS to separate file --- docs/javascript/copy-page.js | 21 +++++++++++++++++++++ mkdocs.yml | 4 ++++ overrides/partials/actions.html | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 docs/javascript/copy-page.js diff --git a/docs/javascript/copy-page.js b/docs/javascript/copy-page.js new file mode 100644 index 000000000..9e283b4b4 --- /dev/null +++ b/docs/javascript/copy-page.js @@ -0,0 +1,21 @@ +document.addEventListener('click', function(e) { + var btn = e.target.closest('#copy-page-btn'); + if (!btn) return; + + var svg = btn.querySelector('svg'); + var orig = svg.innerHTML; + var check = ''; + var x = ''; + + fetch(btn.dataset.url) + .then(function(r) { return r.text(); }) + .then(function(t) { + navigator.clipboard.writeText(t); + svg.innerHTML = check; + setTimeout(function() { svg.innerHTML = orig; }, 1500); + }) + .catch(function() { + svg.innerHTML = x; + setTimeout(function() { svg.innerHTML = orig; }, 1500); + }); +}); diff --git a/mkdocs.yml b/mkdocs.yml index e048947ea..149bfbacc 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -24,6 +24,10 @@ extra_css: - stylesheets/custom.css - stylesheets/language-tags.css +# Custom JavaScript +extra_javascript: + - javascript/copy-page.js + # Additional config extra: first_repo_url: https://github.com/google/adk-python diff --git a/overrides/partials/actions.html b/overrides/partials/actions.html index 41f897ed4..d0d529262 100644 --- a/overrides/partials/actions.html +++ b/overrides/partials/actions.html @@ -17,7 +17,7 @@ {% endif %} {% set raw_url = page.edit_url | replace("github.com", "raw.githubusercontent.com") | replace("/edit/", "/") %} - {% endif %} From 1cb14420cfb1118d26bd0d2e7358a32bd1e29f55 Mon Sep 17 00:00:00 2001 From: Kristopher Overholt Date: Thu, 29 Jan 2026 16:44:33 -0600 Subject: [PATCH 3/6] Use Markdown from llms-txt instead of raw GitHub content --- overrides/partials/actions.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overrides/partials/actions.html b/overrides/partials/actions.html index d0d529262..871ab87a4 100644 --- a/overrides/partials/actions.html +++ b/overrides/partials/actions.html @@ -16,7 +16,7 @@ {% include ".icons/" ~ icon ~ ".svg" %} {% endif %} - {% set raw_url = page.edit_url | replace("github.com", "raw.githubusercontent.com") | replace("/edit/", "/") %} + {% set raw_url = page.url | url ~ "index.md" %} From a493931d7b26d1e3d4870097cf10e6796d438fad Mon Sep 17 00:00:00 2001 From: Kristopher Overholt Date: Thu, 29 Jan 2026 16:45:09 -0600 Subject: [PATCH 4/6] Fix and change evaluation -> evaluate in llms-txt config --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 149bfbacc..33c599093 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -165,7 +165,7 @@ plugins: - runtime/*.md - deploy/*.md - observability/*.md - - evaluation/*.md + - evaluate/*.md - safety/*.md Components: - context/*.md From ba560958ac08e12f7a6b5862b8986925a03073d8 Mon Sep 17 00:00:00 2001 From: Kristopher Overholt Date: Thu, 29 Jan 2026 16:51:54 -0600 Subject: [PATCH 5/6] Add missing pages / folders to llms-txt config in mkdocs.yml --- mkdocs.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkdocs.yml b/mkdocs.yml index 33c599093..fa2a79b06 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -158,6 +158,7 @@ plugins: Build Agents: - get-started/*.md - tutorials/*.md + - visual-builder/*.md - agents/*.md - tools/*.md - tools-custom/*.md @@ -180,6 +181,9 @@ plugins: - streaming/*.md - grounding/*.md Reference: + - release-notes.md + - community.md + - contributing-guide.md - api-reference/index.md - api-reference/rest/index.md From 06e854b8e195fdb6bde47115ed18a76d207991d7 Mon Sep 17 00:00:00 2001 From: Kristopher Overholt Date: Thu, 29 Jan 2026 16:56:17 -0600 Subject: [PATCH 6/6] Fix order of llms-txt config Reference --- mkdocs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index fa2a79b06..e64f9f7a6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -182,10 +182,10 @@ plugins: - grounding/*.md Reference: - release-notes.md - - community.md - - contributing-guide.md - api-reference/index.md - api-reference/rest/index.md + - community.md + - contributing-guide.md # Navigation nav: