Skip to content

Build this site with the shared docs-engine - #1

Merged
burinc merged 1 commit into
mainfrom
feat/adopt-docs-engine
Aug 29, 2026
Merged

burinc merged 1 commit into
mainfrom
feat/adopt-docs-engine

Conversation

@burinc

@burinc burinc commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

The generator lived in this repo as a trimmed port of a private
single-author engine. It has since been extracted to
jlt-commons/docs-engine and
generalized to serve every project site in the organization. Keeping a second
copy here means a markdown fix lands twice, and the two drift in between.

What changes

leaves stays
src/, test/ docs/guide/ — the pages
the engine's templates (base, docs, 404) docs/templates/home.html — this site's own homepage
the engine's static assets (css, highlight.js) docs/img/mark.svg — this site's own mark
src/site/config.clj docs/site.edn, replacing it

content/guide/ moves to docs/guide/ and the mark to docs/img/, copied into
the build by :asset-dirs rather than living among the engine's own static
files. bb.edn keeps only site:build / site:serve / site:clean, which
shell into an engine checkout for local preview and print the clone command when
they cannot find one. CI checks the engine out itself, pinned to v0.2.0.

This site is live, so the output was diffed, not eyeballed

Built the site before the change, kept it, then diffed against the build after:

  • Same file set, plus three additions: .nojekyll and the two mermaid vendor
    files.
  • Byte-identical HTML, except blank lines left behind by a now-false
    {% if mermaid %}. diff -Bw is clean across all four pages.

One regression this would have shipped

The engine loaded the mermaid bundle unconditionally. This site has no diagrams
at all, so adopting the engine as it stood would have added 3.4 MB to every
page
— roughly 450x the weight of the page itself — for a feature it does not
use.

Fixed in the engine first (v0.2.0): detection is now per page, and the site can
override it in either direction with :mermaid in site.edn. This build now
checks the bundle stays unreferenced here, so a regression in that gating fails
the build rather than quietly costing every reader 3.4 MB. Adding a diagram to
this site means updating that check, deliberately.

Also

The README claimed mermaid was unsupported. That is no longer true, and it has
been rewritten along with the build instructions.

The generator lived here, as a trimmed port of a private single-author
engine. It has since been extracted to jlt-commons/docs-engine and
generalized to serve every project site in the organization, so keeping a
second copy here means a markdown fix has to land twice and the two
drift in between.

What leaves: src/, test/, and the engine's own templates and static
assets. What stays is what belongs to this site — its pages, its
homepage template, its mark, and now docs/site.edn for the configuration
that used to be src/site/config.clj.

Content moves to the engine's conventions: content/guide -> docs/guide,
and the mark to docs/img, copied into the build by :asset-dirs rather
than by living among the engine's own static files. bb.edn keeps only
site:build / site:serve / site:clean, which shell into an engine
checkout for local preview and print the clone command when they cannot
find one. CI checks the engine out itself, pinned to v0.2.0.

Verified against the live build rather than by inspection: the output is
byte-identical to what this repo produced before, except for blank lines
left by a now-false {% if mermaid %} and three added files (.nojekyll
and the mermaid bundle, which ships but is never referenced here).
`diff -Bw` across all four pages is clean.

The engine loads mermaid only on pages that have a diagram, as of
v0.2.0. This site has none, so it gained nothing but the vendored file,
and the build now checks the bundle stays unreferenced — a regression in
that gating would otherwise add 3.4 MB to every page here silently.

The README's claim that mermaid is unsupported is no longer true and has
been rewritten along with the build instructions.
@burinc
burinc merged commit bea3e94 into main Aug 29, 2026
2 checks passed
@burinc
burinc deleted the feat/adopt-docs-engine branch August 29, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant