Hugo migration#406
Open
kristin-kronstain-brown wants to merge 3 commits into
Open
Conversation
Signed-off-by: Kristin Brown <kristin.brown@solo.io>
Updates from main
Signed-off-by: Kristin Brown <kristin.brown@solo.io>
Rachael-Graham
approved these changes
Jul 10, 2026
| author: kagent.dev | ||
| --- | ||
|
|
||
| Welcome to kagent! Start here to understand what kagent is, how to install it, and how to contribute. |
Contributor
There was a problem hiding this comment.
duplicates the description
Comment on lines
+10
to
+15
| {{< cards >}} | ||
| {{< card link="/docs/kagent/introduction/what-is-kagent" title="What is kagent?" subtitle="Learn about the core concepts and capabilities of kagent." >}} | ||
| {{< card link="/docs/kagent/introduction/installation" title="Installation" subtitle="Follow our guide to set up kagent." >}} | ||
| {{< card link="https://github.com/kagent-dev/kagent/blob/main/README.md#roadmap" title="Feature Roadmap" subtitle="See what we're planning for the future." >}} | ||
| {{< card link="https://github.com/kagent-dev/kagent/blob/main/CONTRIBUTING.md" title="Contributing" subtitle="Find out how you can help improve kagent." >}} | ||
| {{< /cards >}} |
Contributor
There was a problem hiding this comment.
i think cards on any _index.md file would need to be removed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate docs to Hugo, build marketing + docs together
Summary
Migrates the kagent/kmcp documentation from Next.js MDX to a Hugo + Hextra + docs-theme-extras site, and wires it into the existing Next.js marketing app so both build and deploy as one Cloudflare Worker, one origin. The docs are served as static assets under
/docs/*; the marketing site (home, blog, tools, agents, community, enterprise) stays on Next.js. Also unifies the top navbar so the marketing and docs pages look consistent.Architecture
docs-site/, alongside the Next.js app. The subdirectory sidesteps thepackage.json/go.modcollision that previously required a separate branch./docs. Hugo'sbaseURLcarries the/docsprefix and content lives atcontent/<product>/, so Hugo emits a self-contained tree (pages + css/js/images/favicons) that drops into the worker's static assets with no collisions against the marketing site's/images,sitemap.xml, etc.make.make buildbuilds the Hugo docs, injects the output intopublic/docs/(preserving tracked assets likeversions/), then builds the opennextjs worker. Cloudflare Workers Assets serve/docs/*(static Hugo) before the worker runs, so the marketing worker handles everything else. Verified end-to-end withwrangler dev.What's included
Docs site (
docs-site/)hugo.yaml, layouts, assets,content/kagent/**andcontent/kmcp/**(234 pages), Tailwind/PostCSS pipeline..FirstSection;navbar-link.htmlfor a Docs dropdown (kagent/kMCP with product icons) and uniform link styling; logo links to the marketing home (/).Converter (
scripts/mdx-to-hugo.mjs)make gen-docs). Handles frontmatter merge, component→shortcode mapping (Tabs, Aside, FeatureGrid, Mermaid, QuickLink), version placeholders, link rewrites, and unwraps the'use client'React-component wrapper (kmcp landing).Build tooling
Makefile(build-docs,inject-docs,build-web,build,preview,deploy,serve-docs,gen-docs,clean).previewbuilds docs with a localhost baseURL so internal links stay local..gitignoreupdated for docs build artifacts and injectedpublic/docs.Navbar unification
src/components/navbar.tsxto mirror the Hextra docs nav (order, uniform gray links, Docs dropdown with icons, GitHub icon, search, borderless theme toggle) in light and dark mode./toolsand/agentsfrom the old docs layout (removed theirlayout.tsx) so they render as standalone marketing pages.Fixes
custom.css(Hextra's prebuilt CSS omits somehx:utilities).new-svc-tabpanel id).Editing the docs
docs-site/content/is the source of truth — author docs there directly; the converter is only for re-migrating from the legacysrc/app/docsMDX, not the normal workflow.docs-site/content/kagent/**anddocs-site/content/kmcp/**(Markdown with Hugo frontmatter). A leaf page is<name>.md; a section with children is a folder with_index.md. Ordering isweightin frontmatter; the sidebar and section cards are generated automatically.{{< tabs >}},{{< callout >}},{{< cards >}}, etc.).docs-site/hugo.yaml(menu.main). Same-origin marketing links useparams.localHref; docs products useurl: /<product>.docs-site/assets/css/custom.css(don't rely on ad-hochx:Tailwind utilities — many aren't generated in this build).make gen-docsregeneratesdocs-site/contentfromsrc/app/docs. Diff before committing so hand edits aren't lost.Previewing locally
First-time setup (installs web + docs deps and Hugo modules):
Marketing + docs together — the real combined site (builds everything, serves via
wrangler dev) athttp://localhost:3000:This is where to confirm
/docs/*routing, cross-links between marketing and docs, and the unified navbar.Notes:
make serve-web/next dev,/docsfalls back to the old Next route (no Cloudflare asset layer locally); usemake previewto see the real Hugo docs.wrangler dev(workerd) still bound to port 3000 from a priormake preview—pkill -f wranglerand restart.Follow-ups
src/app/docskept (shadowed by the Hugo docs at the edge); removable later oncegenerate-nav/check-linksare trimmed..github/workflows/preview.yaml) still runsnpm run build:worker; needs Hugo/Go setup +make buildto include docs in PR previews.Testing
make buildgreen; docs bundled into worker assets.wrangler devconfirmed/→ Next,/docs/*→ Hugo.