From 499649d1a3b6a311a9f3ac7cb537b859cd3938ba Mon Sep 17 00:00:00 2001 From: Kristin Brown Date: Thu, 3 Sep 2026 10:44:51 -0400 Subject: [PATCH] Added PDF export Signed-off-by: Kristin Brown --- docs-site/content/kagent/_index.md | 14 ++++++++++++++ docs-site/content/kmcp/_index.md | 4 ++++ docs-site/go.mod | 2 +- docs-site/go.sum | 4 ++-- docs-site/hugo.yaml | 28 ++++++++++++++++++++++++++++ 5 files changed, 49 insertions(+), 3 deletions(-) diff --git a/docs-site/content/kagent/_index.md b/docs-site/content/kagent/_index.md index 1a4f7505..57f56871 100644 --- a/docs-site/content/kagent/_index.md +++ b/docs-site/content/kagent/_index.md @@ -3,6 +3,20 @@ title: kagent description: Concepts, guides, and reference docs for running declarative AI agents on Kubernetes, from install through day-two operations. weight: 1 author: kagent.dev +# PDF export. This one page opting into `book` is the whole opt-in: the format +# stitches this page plus its entire .Pages subtree into one print document, so +# the manual is scoped to this section by where the opt-in lives. kmcp is a +# separate section and carries its own, so the site publishes two manuals. +# +# LIST THE WHOLE SET, not just html and book. Hugo's `outputs` REPLACES a page's +# defaults rather than adding to them, so `["html", "book"]` would silently drop +# this page's .md, RSS and llms.txt. Nothing fails and only this page is +# affected, which is exactly why it would survive review. These four are +# `outputs.section` from hugo.yaml, copied, plus `book`. +# +# The book is not built by an ordinary build: docs-theme-extras gates it behind +# `HUGO_PARAMS_BUILDBOOK=true`, which only the PDF workflow in solo-io/docs sets. +outputs: ["html", "rss", "markdown", "llms", "book"] --- Your complete guide to the AI agent platform for Kubernetes diff --git a/docs-site/content/kmcp/_index.md b/docs-site/content/kmcp/_index.md index 2f40f538..702e568a 100644 --- a/docs-site/content/kmcp/_index.md +++ b/docs-site/content/kmcp/_index.md @@ -3,6 +3,10 @@ title: kmcp description: Scaffold, run, and debug MCP servers locally with the kmcp CLI, then deploy them to Kubernetes as MCPServer resources with managed secrets. weight: 1 author: kagent.dev +# PDF export. See content/kagent/_index.md for why the opt-in is one page and why +# the whole output set is listed rather than just html + book. The two sections +# are separate trees and publish separate manuals, so each carries its own. +outputs: ["html", "rss", "markdown", "llms", "book"] --- Accelerate local development of Model Context Protocol (MCP) servers and manage their deployment to cloud-native environments. diff --git a/docs-site/go.mod b/docs-site/go.mod index bac644c7..f279a3e2 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.3.3 // indirect +require github.com/solo-io/docs-theme-extras v0.3.8 // indirect diff --git a/docs-site/go.sum b/docs-site/go.sum index 462a2cb7..3287469b 100644 --- a/docs-site/go.sum +++ b/docs-site/go.sum @@ -1,2 +1,2 @@ -github.com/solo-io/docs-theme-extras v0.3.3 h1:/hm3fey/xakoRYtJWSoPTDRqEVnHycjvC24HzJtl5NQ= -github.com/solo-io/docs-theme-extras v0.3.3/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= +github.com/solo-io/docs-theme-extras v0.3.8 h1:adccTdWRD21FHUhxv49RKW3VbP+y7d+jXzZMxADAWoM= +github.com/solo-io/docs-theme-extras v0.3.8/go.mod h1:jjjYu/QoD+vMu30zgcpfEuTEGuJOJWs5qai/K18kltg= diff --git a/docs-site/hugo.yaml b/docs-site/hugo.yaml index 95cf4267..efaa7950 100644 --- a/docs-site/hugo.yaml +++ b/docs-site/hugo.yaml @@ -128,6 +128,34 @@ params: themeExtras: brand: oss prodHost: "https://kagent.dev" + + # "Download all docs (PDF)" in the Copy-as-Markdown menu on docs pages, added by + # the module's copy-markdown.html. Setting `distribution` turns the item on and + # selects the solo-io/docs-pdfs release-asset URL shape, which the module + # supplies so it is not repeated per consumer: + # + # .../releases/download/{product}-{distribution}-{version}/{product}-{distribution}-{version}.pdf + # + # `oss` because kagent also ships as an enterprise product, whose manual + # publishes to `kagent-enterprise-latest`. Telling those two apart is the whole + # job of this segment. + # + # `{version}` resolves to `kagent-latest` or `kmcp-latest`. This site has no + # versions at all, so the theme substitutes `latest`, and it prefixes that with + # the section because `params.sections` is registered — without the prefix both + # doc sets would resolve to one URL, and the publishing workflow uploads with + # --clobber, so whichever rendered last would silently sit behind the link on + # both. That substitution needs docs-theme-extras v0.3.8-beta.1 or later; on the + # v0.3.3 this site used to pin, no amount of configuration here produced a link. + # + # `product` is set explicitly because it is otherwise read from + # `params.currentProduct` or `params.folder`, and this site sets neither. + # `params.product` below is NOT that field — it is the section-selector button + # label ("Docs") and is not in the fallback chain. + pdfDownload: + distribution: oss + product: kagent + navbar: displayTitle: false displayLogo: true