Split versioned docs from the main site - #314
Draft
thatbudakguy wants to merge 5 commits into
Draft
Conversation
Splits the single mkdocs.yml/docs_dir into a shared mkdocs-base.yml plus two leaf configs: mkdocs.yml builds the unversioned main site (home/about/community/showcase/blog/release calendar) and mkdocs-docs.yml builds the versioned technical documentation from a new top-level documentation/ folder, published under a /docs/ prefix via mike's deploy_prefix so it no longer duplicates the whole site per version. CI now deploys the main site straight to the gh-pages root (without disturbing mike's prefix) and auto-runs mike deploy for any push to main or a version branch (e.g. 4.x), removing the manual per-branch redeploy step. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Collaborator
|
Tested this locally - I can run both the main site and the docs site separately. I don't see a link from the main site to the docs site, though. Is it supposed to show up in the nav? |
Splitting the docs into a separate mkdocs build removed the "Documentation" nav item without replacing it, leaving the main site with no way to reach the docs. Link to the published /docs/latest/ path instead, since it's now a separate build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds a README section explaining the two independent mkdocs serve commands needed now that the site is two separate configs, and calls out that the main site's "Documentation" nav link points to the published production URL rather than a local docs preview, since the two builds are only combined at deploy time via mike's deploy_prefix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
theme.logo/favicon, extra_css, and the local extra_javascript entry in mkdocs-base.yml are resolved relative to each config's own docs_dir, which mkdocs-docs.yml never accounted for when it moved to docs_dir: documentation. The referenced files (gbl-favicon.png under images/, stylesheets/extra.css, javascripts/tablesort.js) only existed under docs/, so the docs build silently fell back to Material's defaults instead of erroring. Point theme.logo/favicon at the existing documentation/img/ copy of the favicon (MkDocs deep-merges INHERIT'd dicts, so this only overrides those two keys and keeps the rest of theme: from the base config), and copy extra.css/tablesort.js into documentation/ so the inherited extra_css/extra_javascript paths resolve the same way they do for the main site. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
thatbudakguy
marked this pull request as draft
August 31, 2026 17:33
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.
Summary
Fixes #302 without splitting the docs into a separate repo/site.
PR #294 added
mikefor versioned docs, but since there was only onemkdocs.yml/docs_dir/nav,mikeended up versioning the entire site — blog, about page, showcase, etc. — not just the technical documentation. Every version directory ongh-pages(4.x/,5.x/) duplicated the whole site, and because CI only auto-deployed on push tomain, keeping old version branches' unversioned content in sync required manually checking out e.g.4.xand runningmike deployby hand. This is visible in git history:showcase/index.md/community.mddrifted betweenmainand4.x, and a blog post had to be cherry-picked onto both branches to appear on both.This PR keeps everything in this one repository by splitting the single MkDocs config into three files and giving the two "sites" disjoint content directories and deploy targets on
gh-pages:mkdocs-base.yml(new) — shared theme/markdown config, inherited via MkDocs'sINHERITkey.mkdocs.yml(rewritten) — the unversioned main site (Home, About, Community, Showcase, Blog, and a new Release Calendar nav item), built fromdocs/. Deployed straight to the root ofgh-pages.mkdocs-docs.yml(new) — the versioned technical documentation, built from a new top-leveldocumentation/folder (moved out of the olddocs/docs/). Deployed bymikeunder a/docs/prefix (viamike'sdeploy_prefixsetting), so each GeoBlacklight version gets its own copy of just the docs — not the whole site.docs/docs/releases.md("Release Calendar", a cross-version GBL v3–v6 compatibility matrix) moved to the unversioned site as a top-level nav item, since it isn't specific to one version.CI (
.github/workflows/ci.yml) now:mike deploy --config-file mkdocs-docs.ymlon every push tomainor any*.xbranch, automating what was previously a manual per-branch step.gh-pagesroot only onmain, viapeaceiris/actions-gh-pageswithkeep_files: trueso it never disturbs thedocs/directorymikemanages (orCNAME, or the legacy4.x//5.x/directories from before this change, which are left as stale-but-harmless).Not included in this PR (follow-ups)
origin/4.x: GitHub Actions runs the workflow file as committed on the ref being pushed, so the new "deploy on push to a version branch" trigger won't do anything for4.xuntil this same restructuring (new configs +documentation/layout) is also committed onto that branch. Planned as a small follow-up PR targeting4.xafter this merges.mike set-default --config-file mkdocs-docs.yml --push latest: creates the/docs/landing-page redirect. Plainmike deploydoesn't create this on its own, so it needs to be run once by hand after the first real deploy from this PR.4.x/,5.x/, rootversions.json/latest/index.htmlalready ongh-pagesfrom before this change — left alone; they'll go stale but won't 404.Test plan
mkdocs build --config-file mkdocs.yml --strictandmkdocs build --config-file mkdocs-docs.yml --strictboth build cleanly.metadata.md'sread_csvtable (viatable-reader) still renders after the path fix.mike deployin a scratch clone and confirmeddeploy_prefix: docsproducesgh-pages:/docs/5.x/,/docs/latest,/docs/versions.jsonwhile leaving the existing rootversions.json/index.html/4.x//5.x/untouched.https://geoblacklight.org/andhttps://geoblacklight.org/docs/latest/both resolve, and the version-switcher dropdown lists5.x/4.xand switches correctly.mike set-defaultcommand noted above.4.xbackport PR.🤖 Generated with Claude Code