项目简介
light-astrodocs
基于 Astro 的文档站脚手架:多产品文档 · Markdown Content Collections · 产品矩阵 · 全文搜索 · 开箱可静态托管。
- 仓库:https://github.com/jiangfolio/light-astrodocs
- 在线预览:https://jiangfolio.github.io/light-astrodocs/
- 协议:MIT
界面预览
首页

| 多产品文档 | 全部产品 |
|---|---|
![]() |
![]() |
| 产品详情 | 全文搜索 |
|---|---|
![]() |
![]() |
开箱能力
- 文档:按「产品项目 / 分组 / 页面」落盘 Markdown;产品轨 + 侧栏 + 正文 + 本页目录;单产品时自动隐藏产品轨
- 内容:Typora 相对图片路径、同级
assets/资源夹、Mermaid、KaTeX;正文图片点击预览(缩放 / 拖拽) - 产品矩阵:与 docs 一级目录同步;封面、角标、价格 / 收费方案 / 协议等元信息走 frontmatter
- 首页:
home/index.md驱动英雄区与 features;配图放同级assets/ - 搜索:Pagefind 构建期索引;顶栏 Ctrl K 检索
- 工程:页底自动更新日期、「编辑此页」、标准错误页 404 / 403 / 5xx、MIT 开源
- 部署:GitHub Actions → GitHub Pages(含 Mermaid 所需 Chromium)
技术选型
- 站点:Astro 7 · Content Collections · @astrojs/vue · antdv-next
- 样式:Tailwind CSS v4
- Markdown:remark-math · rehype-katex · rehype-mermaid
- 搜索:astro-pagefind / Pagefind
- 发布:GitHub Actions(Playwright +
astro build)· GitHub Pages
.
├── .github/workflows/deploy.yml GitHub Pages 部署
├── public/ 静态资源(favicon 等)
├── docs/screenshots/ README 预览截图
├── src/
│ ├── content/
│ │ ├── docs/ 文档(产品项目 / 分组 / 页面)
│ │ ├── products/ 产品矩阵(id 与 docs 一级目录同名)
│ │ └── home/ 首页文案与 features(含 assets/)
│ ├── components/ 布局与交互组件
│ ├── layouts/ Base / Docs 布局
│ ├── pages/ 路由(docs / products / 错误页)
│ ├── lib/ 文档导航、base 前缀、meta
│ ├── data/site.ts 站点名、导航、footer、编辑仓库
│ └── styles/global.css 全局样式
├── astro.config.mjs site / base(Pages 路径)
└── LICENSE MIT


