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/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/mkdocs.yml b/mkdocs.yml
index e048947ea..e64f9f7a6 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
@@ -154,6 +158,7 @@ plugins:
Build Agents:
- get-started/*.md
- tutorials/*.md
+ - visual-builder/*.md
- agents/*.md
- tools/*.md
- tools-custom/*.md
@@ -161,7 +166,7 @@ plugins:
- runtime/*.md
- deploy/*.md
- observability/*.md
- - evaluation/*.md
+ - evaluate/*.md
- safety/*.md
Components:
- context/*.md
@@ -176,8 +181,11 @@ plugins:
- streaming/*.md
- grounding/*.md
Reference:
+ - release-notes.md
- api-reference/index.md
- api-reference/rest/index.md
+ - community.md
+ - contributing-guide.md
# Navigation
nav:
diff --git a/overrides/partials/actions.html b/overrides/partials/actions.html
new file mode 100644
index 000000000..871ab87a4
--- /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.url | url ~ "index.md" %}
+
+{% endif %}