feat(docs): adopt txn2 design system for docs site#77
Merged
Conversation
Re-skin the docs site to match the txn2 visual identity used by sister project kubefwd. Token-alignment level adoption: keep MkDocs Material chrome, replace the visual layer via extra.css and a custom homepage template. - new DESIGN.md records adoption decisions and defers to upstream txn2/www DESIGN.md and tokens.json as the source of truth - new docs/overrides/home.html: rail, hero, two flagship cards (CLI demo, Go library demo), 7-row stack list, coda, home-footer - mkdocs.yml: single slate palette, font: false so CSS loads the upstream Google Fonts URL with trimmed axes - main.html: load Fraunces, Instrument Sans, JetBrains Mono; expand OG and Twitter meta - extra.css: full port of kubefwd's design system stylesheet (1,536 lines: tokens, blueprint grid, grain/vignette, rail, hero, flagship, terminal, stack, coda, home-footer, plus a complete Material chrome restyle for inner pages) - 404.html: rewrite with the design voice - index.md: reduce to a stub pointing at home.html
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #77 +/- ##
==========================================
+ Coverage 88.96% 89.51% +0.55%
==========================================
Files 18 18
Lines 761 706 -55
==========================================
- Hits 677 632 -45
+ Misses 74 64 -10
Partials 10 10 🚀 New features to boost your workflow:
|
- home.html: stack list "in-memory mode" linked to a non-existent anchor (library/#in-memory-mode). The actual heading slug on library.md is from-a-string-in-memory. Fixed. - home.html, mkdocs.yml: copyright start year and est. stamp said 2018, but the first commit on master is 2019-02-15. Corrected the rail stamp to "est. 2019" and the copyright in both home footer and mkdocs.yml to 2019-2026. - home.html: rail and hero version stamp said "v1.x". Pinned to the actual current release v1.8.0 (verified via gh api). - main.html: skip-to-content link only existed on the homepage template. Added a header-block override so every inner page gets one too, with a focusable #main anchor injected at the top of the content area to give the skiplink a target. Material's <main> element has no id by default.
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
extra.cssand a custom homepage template.docs/overrides/home.htmlprovides the full-bleed homepage (rail, hero, two flagship cards for the CLI and the Go library, 7-row stack list, coda, custom home-footer). Inner pages still render through Material with the slate scheme remapped to upstream tokens.DESIGN.mdrecords the adoption decisions and defers to upstreamtxn2/wwwDESIGN.mdandtokens.jsonas the single source of truth. Includes a brief recap of the MkDocs Material learnings carried over from kubefwd.What changed
mkdocs.yml: singleslatepalette,font: falseso CSS loads the upstream Google Fonts URL with trimmed axes (Fraunces ital + opsz/wght, Instrument Sans roman, JetBrains Mono roman).docs/overrides/main.html: load the upstream Google Fonts via a single<link>, expand OG and Twitter meta.docs/overrides/home.html(new): full homepage template with rail, hero (txeh / /etc/hosts / management.), CLI demo card with real `txeh add` / `txeh list ip` / `txeh remove host` invocations, library demo card with the `NewHostsDefault` / `AddHost` / `Save` path, stack list of features linking to real anchors, coda, home-footer with a `txn2 / org` panel.docs/overrides/404.html: rewrite in the design voice.docs/stylesheets/extra.css: full port of kubefwd's design system stylesheet (1,536 lines: tokens, blueprint grid, grain/vignette overlays, rail, hero, flagship, terminal, stack, coda, home-footer, plus a complete[data-md-color-scheme=\"slate\"]Material chrome restyle for inner pages, including Mermaid theme variables, code blocks, admonitions, tabbed content, and tables).docs/index.md: reduce to a stub withtemplate: home.html.DESIGN.md(new): local adoption record. References upstream as canonical.Test plan
mkdocs build --strictbuilds clean/cli/,/library/) inherit the slate scheme and the txn2 tokensnavigation.instantre-registration viawindow.__txehClocksentinel