Repository navigation
Commit 62bb139
Scaffold the AgStack documentation site
Hugo + Docsy site that pulls component documentation out of other AgStack
repositories and publishes it as one set of docs. agstack/pancake is wired in
live as the single real import; its docs/ tree is, with palefire's, the only
substantial one in the organisation today. Everything else in AgStack documents
itself in a README, which is a content problem rather than a pipeline problem —
hence one real import rather than a speculative five.
The site is the documentation: sections live at the content root, so / is the
index itself rather than a splash page in front of it.
MECHANISM
Each documented repo is a git submodule under external/, pinned to a commit.
Hugo mounts its docs/ into assets/, and a content adapter turns those files into
pages. Two deliberate departures from the kernelci.org precedent this follows:
* Module mounts instead of tracked symlinks. Symlinked directories inside
content/ are a fragile corner of Hugo that its maintainers have discussed
removing, and kernelci is still pinned to Hugo 0.97.3 as a result.
* Mount into assets/ and generate pages, rather than straight into content/.
Upstream Markdown has no front matter, and Hugo does not derive a title from
the filename, so the direct mount yields a blank <title>, an empty Docsy <h1>
above the document's own heading, and blank sidebar labels. The adapter takes
the title from upstream front matter if present, else the leading H1, else the
filename, and lifts that heading out of the body either way.
Importing GitHub-oriented Markdown charges two further taxes, both paid here:
* layouts/_markup/render-link.html rewrites repo-relative *.md cross-links to
real permalinks. pancake had ten; all resolve.
* The adapter sets Docsy's github_repo / github_subdir /
path_base_for_github_subdir page params. Adapter-generated pages do have a
.File — it resolves to the adapter template — so without this, "View page
source" and "Edit this page" send readers to _content.gotmpl instead of the
Markdown they are reading.
Dependabot's gitsubmodule ecosystem bumps the pinned pointers weekly, which is
what stops imported docs from silently freezing at the commit they were added
at. `make update` is scoped to external/ so it cannot drag the theme off its
release tag.
RUNNING IT
Native: Node >= 24, and Hugo pinned in package.json via hugo-extended, so
nothing is installed globally. `make serve`.
Docker: `docker compose up serve` on a bare clone, with no host toolchain. The
entrypoint fetches submodules into the bind mount and installs the toolchain on
first run. Notable details, each of which cost a round to find:
* No named volumes. Docker creates a volume's mountpoint inside the bind mount
as root, which blocks both the submodule checkout and npm ci for the
unprivileged container user.
* node_modules therefore lives in the working tree, shared with the host — fine
on Linux, a trap if installed on macOS or Windows, since hugo-extended and
sass-embedded ship platform-specific binaries. The entrypoint tests that Hugo
actually runs rather than that the file exists, and reinstalls if not.
* The bind mount carries :z. On an SELinux-enforcing host a checkout under $HOME
is labelled user_home_t, which container processes may not read, so the mount
fails with "Permission denied" despite being world-readable.
* Hugo is not baked into the image: `npm ci` installs the version pinned in
package.json, so the container and a local checkout share one binary; CI will
inherit that by running the same command.
BRANDING
Palette and marks derive from the AgStack logo, whose <style> block defines
exactly five fills: #0570d1 primary, #34a37e secondary, #1eafc6 info, #a3d641
warning, #2b2b2b body. $danger stays Bootstrap's red — none of the five reads as
"danger" and inventing one would make destructive states ambiguous. Bootstrap's
named $blue/$cyan/$green are set too, since Docsy's box and link utilities
resolve to those rather than the theme colours.
Measuring each SVG path's bounding box separated the mark from the wordmark
cleanly, giving a monochrome navbar mark, the full lockup for the landing page,
and a complete favicon set including a hand-built multi-resolution .ico.
LICENSING
A page keeps the licence of the repository it was written in; rendering a
document does not re-license it. Documentation authored here is CC BY-SA 4.0,
the site machinery is Apache-2.0, and imported pages carry their source's
licence — pancake is EUPL-1.2, so this is a real distinction rather than a
formality. Stated in the footer, on each imported page's banner, and in full at
/contributing/licensing/.
STATE
Verified with Hugo 0.166.0 extended and Docsy v0.17.0: 26 pages, zero build
warnings, every imported page titled and ordered from its own content, exactly
one <h1> per page, no unresolved cross-links, and repository links resolving to
agstack/pancake. Checked in a browser at 1400/900/390px in both colour modes. A
missing submodule fails the build with exit 1 rather than publishing empty
sections, and `make check` exits non-zero on an unresolved cross-link.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016mn32g3xvTVhT79ZVEbfUe0 parents commit 62bb139
40 files changed
Lines changed: 3030 additions & 0 deletions
File tree
- .github
- assets
- icons
- scss
- config
- _default
- development
- content
- contributing
- inatrace
- pancake
- external
- layouts
- _markup
- _shortcodes
- static
- themes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments