diff --git a/docs-site/go.mod b/docs-site/go.mod index 64e3c587..698d0766 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.6 // indirect diff --git a/docs-site/go.sum b/docs-site/go.sum index 860f50b0..6641e388 100644 --- a/docs-site/go.sum +++ b/docs-site/go.sum @@ -1,2 +1,12 @@ 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= +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= +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= +github.com/solo-io/docs-theme-extras v0.2.2-beta.6 h1:eUBymiCl4Q2EnQJEgMINXul2haSQwhKzj1WUr6rCxXU= +github.com/solo-io/docs-theme-extras v0.2.2-beta.6/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= diff --git a/docs-site/hugo.yaml b/docs-site/hugo.yaml index fa93f101..95cf4267 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. @@ -112,31 +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 - # 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 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 ` - {{- end -}} - - {{- if $hasChildren -}} - - {{- end -}} - - {{- end -}} - - {{- end -}} -{{- end -}}