ADR 按 MADR 格式渲染,带状态、日期、决策者徽章与按关键词着色的后果条目
docusaurus-template — Docusaurus 文档模板
作者 stump-wtf
基于 Docusaurus 的文档站点模板,采用 Bubbletea TUI 设计系统,将 ADR 与规格文档作为一等内容渲染,并支持 Gitea Pages 与 GitHub Pages 双发布。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
规格文档按 RFC 2119 义务高亮 MUST、SHOULD、MAY,每条需求可单独锚定
正文中裸写的 ADR 编号自动转为链接芯片,且不重复链接已有链接或代码片段
根据 frontmatter 关系生成项目级 mermaid 图与每个 ADR 的迷你 DAG,并推导反向关系
一次构建同时发布到 Gitea Pages 与 GitHub Pages,仅 url 不同
提供设计系统画廊页面,集中展示所有令牌、徽章与组件在明暗两种主题下的效果
模板详细介绍
这是一个以 Docusaurus 构建的文档站点模板,视觉上采用 Bubbletea TUI 设计系统:圆角 Lip Gloss 边框、等宽字体、蓝黑底色上的 ANSI 霓虹配色。它把架构决策记录(ADR)和规格说明当作专门的内容类型来渲染,而不是当作普通页面。ADR 使用 MADR 格式,带状态、日期、决策者徽章,后果条目按关键词着色,并根据 frontmatter 中声明的关系生成迷你 DAG。规格文档会按义务高亮 RFC 2119 关键词(MUST、SHOULD、MAY),每条需求可单独锚定。正文中裸写的 ADR-0001 会自动变成链接芯片,但不会重复链接已处于链接或代码片段中的内容。项目级 mermaid 图会汇总 supersedes、extends、governs、implements 等关系边,并推导反向关系。
站点内容源是 docs/ 下的纯 markdown,构建时由 docs-site/plugins/sdd-content/ 生成 MDX 到 docs-generated/(已 gitignore,不提交)。项目相关配置集中在 docs-site/docusaurus.config.ts 顶部的四个常量:PROJECT_TITLE、PROJECT_TAGLINE、GITEA_URL、REPO_NAME,baseUrl 由 REPO_NAME 推导。设计令牌放在 src/css/tokens/,来自设计系统导出,不应直接编辑;项目样式应写入 src/css/custom.css。
发布方面,一次构建可同时输出到仅局域网可访问的 Gitea Pages 和公开的 GitHub Pages,两者只有 url 不同。Gitea Pages 部署需要在仓库 Actions secrets 中配置 PAGES_ACCESS_KEY_ID 与 PAGES_SECRET_ACCESS_KEY,这些凭据来自基础设施清单中的 pages.users 列表;缺少凭据时构建仍会通过,只有部署步骤失败。GitHub Pages 无需凭据,但需在镜像仓库上启用 Pages 并将来源设为 GitHub Actions。
本地开发使用 make 命令:docs-install 执行 npm ci,docs-serve 启动开发服务器并在 docs/ 变化时热重载,docs 执行生产构建到 docs-site/build,check 执行类型检查与构建。需要 Node 20 及以上,Node 23 不可用,CI 固定使用 22。仓库以 Gitea 为唯一真实来源,GitHub 上的副本是只读推送镜像,每次同步会强制替换历史。
适合你的项目吗?
适用场景
- 为软件项目维护架构决策记录,并希望 ADR 之间的关系可视化
- 编写带 RFC 2119 义务关键词的规格说明,需要每条需求可被单独引用
- 同时需要局域网内 Gitea Pages 与公开 GitHub Pages 两处文档发布
- 希望文档站点采用终端风格视觉语言,并保留明暗主题切换
适合人群
- 需要以 ADR 和规格文档为核心内容的软件项目文档站点
- 使用 Gitea 作为主仓库、GitHub 作为公开镜像的团队
- 接受在 docs/ 下以纯 markdown 维护内容、构建时生成 MDX 的工作流
- 希望基于现有 Docusaurus 项目定制样式,但保留设计令牌与项目样式分离
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
通过 Gitea 的 Use this template 或 git clone 生成新仓库,然后移除 .git 并重新初始化
- 2
在 docs-site/docusaurus.config.ts 顶部修改 PROJECT_TITLE、PROJECT_TAGLINE、GITEA_URL、REPO_NAME 四个常量
- 3
替换 docs/adrs/ 与 docs/specs/ 下的示例内容,侧边栏、索引和图会按现有文件自动生成
- 4
Gitea Pages 部署需在仓库 Actions secrets 中配置 PAGES_ACCESS_KEY_ID 与 PAGES_SECRET_ACCESS_KEY,凭据来自基础设施清单的 pages.users 列表
- 5
GitHub Pages 需在镜像仓库启用 Pages 并将来源设为 GitHub Actions;本地需要 Node 20 及以上,Node 23 不可用
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 使用 Gitea Pages 部署功能需在仓库 Actions secrets 中配置 PAGES_ACCESS_KEY_ID 与 PAGES_SECRET_ACCESS_KEY 两项凭据,否则部署步骤会失败(构建仍可通过)。
- GitHub Pages 发布无需凭据,但必须在镜像仓库上启用 Pages 并将来源设置为 GitHub Actions。
- 本地开发需 Node 20 及以上,Node 23 不可用,CI 固定使用 22。
- Gitea 仓库为唯一真实来源,分支、推送、PR 与 issue 均应在 Gitea 上进行;GitHub 副本为只读推送镜像,其历史每次同步会被强制替换。
- src/css/tokens/ 下的设计令牌为原样引入,不应直接编辑;项目样式应写入 src/css/custom.css。
- docs-generated/ 为构建产物,已 gitignore,不应提交到仓库。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
The Gitea Pages deploy needs `PAGES_ACCESS_KEY_ID` and `PAGES_SECRET_ACCESS_KEY` in the repo's Actions secrets.
README 原文
GitHub Pages needs no credentials, but Pages must be enabled on the mirror with **Source: GitHub Actions**.
README 原文
Node 20+ required. Node 23 does **not** work
README 原文
Gitea (`stump.wtf/docusaurus-template`) is the source of truth — branch, push, PR and file issues there.
README 原文
**Never edit `src/css/tokens/`.** They are vendored verbatim from the design system export.
README 原文
https://github.com/stump-wtf/docusaurus-template/blob/main/LICENSEhttps://github.com/stump-wtf/docusaurus-template/blob/main/README.md**Never commit `docs-generated/`.**
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-01。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 80 / 100
- 技术栈
- Docusaurus
- 网站类型
- 文档
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-08-26
- 截图检查日期
- 2026-10-01
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Docusaurus。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: 6f0def1904178a8d54ff82256d3e2d4c53df14ca57a051fc173efcbf7a6e4c6e
2026-10-01T03:46:43.859Z
来源文件 / 仓库# docusaurus-template A Docusaurus documentation template styled with the **Bubbletea TUI design system** — a terminal-native visual language of rounded Lip Gloss borders, monospace type, and ANSI neon on blue-black. It renders ADRs and specifications as first-class artifacts rather than as generic pages, and publishes from one build to both a LAN-only Gitea Pages host and a public GitHub Pages host. **Live:** https://stump-wtf.github.io/docusaurus-template/ (public) · https://stump-wtf.pages.stump.rocks/docusaurus-template/ (LAN) This repository is its own demo: the ADRs and the specification it publishes are the real decisions behind the template. ## What you get | | | |---|---| | **ADR rendering** | MADR format with status / date / decision-maker badges, consequence bullets colour-coded by keyword, and a mini-DAG of every relationship declared in frontmatter | | **Spec rendering** | RFC 2119 keywords highlighted by obligation — `MUST` coral, `SHOULD` gold, `MAY` cyan — with every requirement individually anchorable | | **Cross-references** | A bare `ADR-0001` in prose becomes a chip linking to it, without double-linking anything already in a link or code span | | **Artifact graph** | A project-wide mermaid graph of every `supersedes` / `extends` / `governs` / `implements` edge, with inverses derived | | **Landing page** | A real landing page, not a generated index | | **Design gallery** | Every token, badge and component on one page, in both themes — see `/design-system` | | **Dual publishing** | Gitea Pages and GitHub Pages from one build; only `url` differs | | **Light and dark** | Dark by default, respecting `prefers-color-scheme`; every colour is a token, so the toggle repaints everything | ## Using it ### 1. Generate a repository This is a Gitea template repository — use **Use this template** on https://gitea.stump.rocks/stump.wtf/docusaurus-template, or: ```sh git clone https://gitea.stump.rocks/stump.wtf/docusaurus-template.git my-project cd my-project && rm -rf .git && git init ``` ### 2. Rename four constants Everything project-specific lives in one block at the top of `docs-site/docusaurus.config.ts`: ```ts const PROJECT_TITLE = 'My Project'; const PROJECT_TAGLINE = 'What it does, in one line'; const GITEA_URL = 'https://gitea.stump.rocks/stump.wtf/my-project'; const REPO_NAME = 'my-project'; ``` That is the whole "make it mine" step. `baseUrl` derives from `REPO_NAME`, and both Pages hosts serve under it. ### 3. Replace the content ``` docs/adrs/ADR-0001-*.md your decisions docs/specs/<domain>/spec.md your requirements docs/specs/<domain>/design.md how you built it ``` Delete the two ADRs and the spec that ship here. Nothing references them by name — sidebars, indexes and the graph are all generated from whatever is present. ### 4. Get Pages credentials provisioned The Gitea Pages deploy needs `PAGES_ACCESS_KEY_ID` and `PAGES_SECRET_ACCESS_KEY` in the repo's Actions secrets. They come from the `pages.users` list in the infrastructure inventory — add the repo there and run the pages playbook. Skip this and the site still builds green on every push; only the deploy step fails, with `Garage does not support anonymous access yet`. That 403 is rclone falling back to anonymous — it names the symptom, not the missing secret. GitHub Pages needs no credentials, but Pages must be enabled on the mirror with **Source: GitHub Actions**. ## Local development ```sh make docs-install # npm ci make docs-serve # dev server, hot reload on docs/ changes make docs # production build into docs-site/build make check # typecheck + build — what CI gates on ``` Node 20+ required. Node 23 does **not** work: Docusaurus fails on ProgressPlugin validation, which is why CI pins 22. ## How it fits together ``` docs/ source of truth — plain markdown, readable on the forge adrs/ MADR-format decisions specs/<domain>/ spec.md + design.md docs-generated/ MDX generated on every build — gitignored, never committed docs-site/ docusaurus.config.ts the four constants, and nothing else you need to touch plugins/sdd-content/ frontmatter → MDX: badges, RFC 2119, graph, mini-DAGs src/css/tokens/ vendored design tokens — DO NOT EDIT src/css/custom.css the Infima bridge + page styles — edit this instead src/components/ badge and layout components used from MDX src/pages/ landing page and design-system gallery .gitea/workflows/ the real CI: secret scan, build, Gitea Pages .github/workflows/ public GitHub Pages twin only ``` Two rules keep this maintainable: - **Never edit `src/css/tokens/`.** They are vendored verbatim from the design system export. Project styling goes in `custom.css`, so a token refresh is a clean re-copy rather than a merge. - **Never commit `docs-generated/`.** `docs/` is the source of truth; the generated MDX is a build artifact. For the design rationale, read [ADR-0001](docs/adrs/ADR-0001-docusaurus-and-the-bubbletea-design-system.md) and [ADR-0002](docs/adrs/ADR-0002-vendored-plugin-over-published-package.md); for how the pieces fit, [the design doc](docs/specs/documentation-site/design.md). ## Canonical repo Gitea (`stump.wtf/docusaurus-template`) is the source of truth — branch, push, PR and file issues there. The GitHub copy under `stump-wtf/docusaurus-template` is a read-only push mirror whose history is force-replaced on every sync; a PR opened against it targets a branch that will be overwritten. ## Credits The Bubbletea TUI design system is original work inspired by the open-source [Charm](https://charm.sh) ecosystem — Bubble Tea, Bubbles, Lip Gloss, Gum, Glow. It is not the official Charm brand and reproduces neither Charm's logo nor its commercial typefaces; the type is the closest free substitute (JetBrains Mono, Space Mono, Silkscreen).
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

easy-sop-docs
Easy SOP Docs: template Docusaurus para documentacao SOP, runbooks, servidores, politicas de TI e operacoes.
Docusaurus · 文档

project-documentation-template
A template repo for a "large" project website
Docusaurus · 文档

template-docusaurus-docs
Docusaurus Docs template for dhub.dev
Docusaurus · 文档

template
Docusaurus template for GraphQL-Markdown
Docusaurus · 文档

docusaurus-template
A template for simple Docusaurus-based SRO "documentation" websites.
Docusaurus · 文档

docs-site-template
A docs website from markdown: a Docusaurus alternative.
Docusaurus · 文档
