From 80105c1eb983e70872b26ebb04a37a824c60a8e1 Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Mon, 24 Aug 2026 08:36:20 -0400 Subject: [PATCH 1/7] Section theme redesign Signed-off-by: Kristin Brown --- docs-site/go.mod | 2 +- docs-site/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs-site/go.mod b/docs-site/go.mod index 64e3c587..fb47b7d7 100644 --- a/docs-site/go.mod +++ b/docs-site/go.mod @@ -2,4 +2,4 @@ module github.com/kagent-dev/website-docs go 1.21 -require github.com/solo-io/docs-theme-extras v0.2.0 // indirect +require github.com/solo-io/docs-theme-extras v0.2.2-beta.2 // indirect diff --git a/docs-site/go.sum b/docs-site/go.sum index 860f50b0..d506940d 100644 --- a/docs-site/go.sum +++ b/docs-site/go.sum @@ -1,2 +1,4 @@ github.com/solo-io/docs-theme-extras v0.2.0 h1:GShYCtM7oUC3UqHOqCPwPzsKe9jKdA1OXC0LVqo+h7w= github.com/solo-io/docs-theme-extras v0.2.0/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.2.2-beta.2 h1:c3IW3R9691nA4heVWXoafVv4+WgvIOn2ku0uImUgJMM= +github.com/solo-io/docs-theme-extras v0.2.2-beta.2/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= From 8809c8fe217d567c0eb0c2b212a8fafecaf89eea Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Mon, 24 Aug 2026 10:23:49 -0400 Subject: [PATCH 2/7] Update go mod Signed-off-by: Kristin Brown --- docs-site/go.mod | 2 +- docs-site/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs-site/go.mod b/docs-site/go.mod index fb47b7d7..e660b763 100644 --- a/docs-site/go.mod +++ b/docs-site/go.mod @@ -2,4 +2,4 @@ module github.com/kagent-dev/website-docs go 1.21 -require github.com/solo-io/docs-theme-extras v0.2.2-beta.2 // indirect +require github.com/solo-io/docs-theme-extras v0.2.2-beta.3 // indirect diff --git a/docs-site/go.sum b/docs-site/go.sum index d506940d..2281a25c 100644 --- a/docs-site/go.sum +++ b/docs-site/go.sum @@ -2,3 +2,5 @@ github.com/solo-io/docs-theme-extras v0.2.0 h1:GShYCtM7oUC3UqHOqCPwPzsKe9jKdA1OX github.com/solo-io/docs-theme-extras v0.2.0/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= github.com/solo-io/docs-theme-extras v0.2.2-beta.2 h1:c3IW3R9691nA4heVWXoafVv4+WgvIOn2ku0uImUgJMM= github.com/solo-io/docs-theme-extras v0.2.2-beta.2/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.2.2-beta.3 h1:geeEvmG3ws5YrXF8vqIn6FrYo5iYsdmOz9T9sGQet9I= +github.com/solo-io/docs-theme-extras v0.2.2-beta.3/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= From 0a6a2513f74e8b6b4c9e428f266f42c95aabf52a Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Mon, 24 Aug 2026 13:08:12 -0400 Subject: [PATCH 3/7] Updates Signed-off-by: Kristin Brown --- docs-site/go.mod | 2 +- docs-site/go.sum | 2 + docs-site/hugo.yaml | 66 +++++++++++++----- docs-site/layouts/_partials/sidebar.html | 88 ------------------------ 4 files changed, 51 insertions(+), 107 deletions(-) delete mode 100644 docs-site/layouts/_partials/sidebar.html diff --git a/docs-site/go.mod b/docs-site/go.mod index e660b763..37c6b2d0 100644 --- a/docs-site/go.mod +++ b/docs-site/go.mod @@ -2,4 +2,4 @@ module github.com/kagent-dev/website-docs go 1.21 -require github.com/solo-io/docs-theme-extras v0.2.2-beta.3 // indirect +require github.com/solo-io/docs-theme-extras v0.2.2-beta.4 // indirect diff --git a/docs-site/go.sum b/docs-site/go.sum index 2281a25c..2c013f33 100644 --- a/docs-site/go.sum +++ b/docs-site/go.sum @@ -4,3 +4,5 @@ github.com/solo-io/docs-theme-extras v0.2.2-beta.2 h1:c3IW3R9691nA4heVWXoafVv4+W github.com/solo-io/docs-theme-extras v0.2.2-beta.2/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= github.com/solo-io/docs-theme-extras v0.2.2-beta.3 h1:geeEvmG3ws5YrXF8vqIn6FrYo5iYsdmOz9T9sGQet9I= github.com/solo-io/docs-theme-extras v0.2.2-beta.3/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.2.2-beta.4 h1:TbT6XnXpTIsTN8Cq2r1WpnMIN8yEa0Xs2oxZxn1Kx8M= +github.com/solo-io/docs-theme-extras v0.2.2-beta.4/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= diff --git a/docs-site/hugo.yaml b/docs-site/hugo.yaml index fa93f101..8ae48ea4 100644 --- a/docs-site/hugo.yaml +++ b/docs-site/hugo.yaml @@ -71,6 +71,43 @@ markup: enableInlineShortcodes: true params: + # Section registry, alphabetical. A section exists because it is a key here. + # See docs-theme-extras USAGE.md, "Versions and sections". + # + # kagent docs are two parallel doc sets with NO version axis, which is what + # `sections` models — the theme resolves them positionally (one segment below + # the docs root) precisely because no version can follow them. Registering + # them here is what gives this site the navbar section selector, the mobile + # drawer's section chips, and a left nav rooted at the CURRENT doc set instead + # of at site.Home. Before it, this repo carried a hand-written sidebar + # override to get that last part; registering the sections replaced it. + # + # No `title` on either: both take their label from their landing page's title + # ("kagent", "kmcp"), which is where it belongs. + # + # `icon` keeps the product marks the hand-rolled menu.main dropdown showed. + # These are the SAME files navbar-link.html inlines for the marketing nav + # (assets/icons/nav-.svg) — the theme's utils/render-icon.html resolves + # an `assets/` svg directly, so nothing had to move into static/. Paths are + # assets-relative and include the extension; a value the resolver cannot match + # falls through to a Material Icons ligature and renders as literal text, so a + # typo here shows up on the page rather than failing the build. + # + # Do NOT add params.versions to make something else work. These sections + # resolve through the theme's version-less path, and a single version entry + # moves the whole site onto the versioned path, where a section is only + # recognized directly above a version tree — of which this site has none. + sections: + kagent: + icon: icons/nav-kagent.svg + kmcp: + icon: icons/nav-kmcp.svg + + # Label on the section selector button. Without it the button falls back to + # site.Title ("kagent docs"), which reads oddly above a menu offering kagent + # and kmcp. Matches the "Docs" label the hand-rolled menu dropdown used. + product: "Docs" + # Hide the visible "Last updated on " footer (imported OSS content # modules ship displayUpdatedDate=true; this overrides it). The git date still # feeds the sitemap for SEO. @@ -119,24 +156,17 @@ menu: # or the prefix doubles to /docs/docs/…. url: / weight: 1 - # Child entries turn "Docs" into a dropdown. Hextra's navbar-link.html - # renders any menu item with children as a dropdown toggle (matches agw's - # standalone/kubernetes split). kagent docs are unversioned, so these point - # straight at each product's section landing. - - name: kagent - parent: docs - url: /kagent - weight: 1 - params: - # Matches assets/icons/nav-.svg; rendered inline by navbar-link.html - # so the dropdown carries the same product marks as the JS marketing nav. - icon: kagent - - name: kmcp - parent: docs - url: /kmcp - weight: 2 - params: - icon: kmcp + # NOTE: the kagent / kmcp child entries that used to hang off "Docs" are + # gone. They were a hand-rolled stand-in for the theme's section selector, + # which now renders from params.sections above — keeping both would put the + # same two destinations in the navbar twice. agentgateway.dev registers its + # kubernetes/standalone sections the same way and likewise has no menu + # children for them. + # + # The product marks those entries carried are NOT lost: params.sections above + # sets the same assets/icons/nav-.svg files via the theme's `icon` key. + # navbar-link.html still renders icons for the remaining menu items, so its + # `params.icon` handling stays in use (see the GitHub entry below). # Marketing pages are served on the SAME origin (the Next.js worker), at the # site root — not under the docs' /docs baseURL. Use params.localHref (emitted # verbatim by navbar-link.html) so these stay root-relative and clicking stays diff --git a/docs-site/layouts/_partials/sidebar.html b/docs-site/layouts/_partials/sidebar.html deleted file mode 100644 index fd2a0d40..00000000 --- a/docs-site/layouts/_partials/sidebar.html +++ /dev/null @@ -1,88 +0,0 @@ -{{- /* - kagent project sidebar override. - - Why this exists: Hextra v0.12 ships layouts/_partials/sidebar.html, which - (per the _partials-shadows-partials precedence rule) wins over docs-theme- - extras' layouts/partials/sidebar.html. Hextra's native sidebar roots the tree - at the current section, so kagent's nav "drills down" as you navigate deeper - instead of showing the whole product tree. - - kagent docs are flat + unversioned but split across two products (kagent + kmcp, - each a top-level content section). This override roots the tree at the product - section via .FirstSection — the current page's top-level section ancestor — so - every page in a product shows that product's full, expandable tree with the - active branch auto-expanded. Using .FirstSection (rather than parsing the URL - for a /docs/ prefix) keeps this correct regardless of the baseURL - subpath the site is served under. It reuses the same CSS classes / - data-attributes as extras' sidebar (sidebar-link, sidebar-toggle, - sidebar-children, data-sidebar-item, sidebar-mobile-panel) so the toggle JS and - mobile drawer in docs-theme-extras keep working. - - Called by extras' docs/single.html + docs/list.html as: - {{ partial "sidebar.html" (dict "context" .) }} -*/ -}} -{{- $context := .context -}} - -{{- /* The site home (_index.md) is the /docs landing itself — it has no single - product tree to show, so suppress the sidebar there. */ -}} -{{- if $context.IsHome -}} - -{{- else -}} - {{- $navRoot := $context.FirstSection -}} - - - -{{- end -}} - -{{- /* Recursive tree renderer — mirrors extras' render-sidebar-tree markup. */ -}} -{{- define "kagent-sidebar-tree" -}} - {{- $page := .page -}} - {{- $current := .current -}} - {{- $depth := .depth | default 0 -}} - {{- if gt $depth 4 -}}{{- return -}}{{- end -}} - - {{- $children := $page.Pages -}} - {{- if gt (len $children) 0 -}} - - {{- end -}} -{{- end -}} From d12388cd539478541e75e654df4dcb30bd2a2765 Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Mon, 24 Aug 2026 14:00:49 -0400 Subject: [PATCH 4/7] Updated go mod Signed-off-by: Kristin Brown --- docs-site/go.mod | 2 +- docs-site/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs-site/go.mod b/docs-site/go.mod index 37c6b2d0..5e8d5e65 100644 --- a/docs-site/go.mod +++ b/docs-site/go.mod @@ -2,4 +2,4 @@ module github.com/kagent-dev/website-docs go 1.21 -require github.com/solo-io/docs-theme-extras v0.2.2-beta.4 // indirect +require github.com/solo-io/docs-theme-extras v0.2.2-beta.5 // indirect diff --git a/docs-site/go.sum b/docs-site/go.sum index 2c013f33..f8c1c815 100644 --- a/docs-site/go.sum +++ b/docs-site/go.sum @@ -6,3 +6,5 @@ github.com/solo-io/docs-theme-extras v0.2.2-beta.3 h1:geeEvmG3ws5YrXF8vqIn6FrYo5 github.com/solo-io/docs-theme-extras v0.2.2-beta.3/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= github.com/solo-io/docs-theme-extras v0.2.2-beta.4 h1:TbT6XnXpTIsTN8Cq2r1WpnMIN8yEa0Xs2oxZxn1Kx8M= github.com/solo-io/docs-theme-extras v0.2.2-beta.4/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.2.2-beta.5 h1:jVUDhC3rbfVbePzc45oFEp1JyuHfiViC+stAFCQTZME= +github.com/solo-io/docs-theme-extras v0.2.2-beta.5/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= From c210ba53cf960e48c28908d65b7a50e834a109ce Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Mon, 24 Aug 2026 14:38:46 -0400 Subject: [PATCH 5/7] Bug fix Signed-off-by: Kristin Brown --- docs-site/hugo.yaml | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/docs-site/hugo.yaml b/docs-site/hugo.yaml index 8ae48ea4..95cf4267 100644 --- a/docs-site/hugo.yaml +++ b/docs-site/hugo.yaml @@ -149,24 +149,25 @@ params: # on the Next.js site, so those link out to absolute kagent.dev URLs. menu: main: - - name: Docs - identifier: docs - # Menu urls are relative to baseURL, so Hugo prepends the /docs subpath - # automatically — use logical paths here (/, /kagent, /kmcp), NOT /docs/…, - # or the prefix doubles to /docs/docs/…. - url: / - weight: 1 - # NOTE: the kagent / kmcp child entries that used to hang off "Docs" are - # gone. They were a hand-rolled stand-in for the theme's section selector, - # which now renders from params.sections above — keeping both would put the - # same two destinations in the navbar twice. agentgateway.dev registers its - # kubernetes/standalone sections the same way and likewise has no menu - # children for them. + # NOTE: the whole "Docs" entry is gone, children and parent alike. It used to + # be a hand-rolled stand-in for the theme's section selector: a parent named + # "Docs" with kagent / kmcp children. params.sections above now renders that + # same control, with the same two destinations and the same product marks + # (the theme's `icon` key reads the identical assets/icons/nav-.svg + # files), and the selector's own button is labelled from params.product — + # also "Docs". Keeping the menu entry put TWO buttons reading "Docs" side by + # side in the navbar. + # + # Removing the parent costs no navigation. navbar-link.html renders any item + # with children as a `