minidocs
更新日志
本页尚未翻译,显示的是原文。查看原文

0.1.0

The first release of minidocs. It does not ship a docs site, it ships the parts you build one with: you keep your content in an Astro collection and assemble the pages yourself. minidocs is experimental until 1.0, so minor releases may break things.

Content

Load your docs with minidocs’ glob, and page ids come from file paths, typed and checked. Locales are the first level of directories, with fallback for untranslated pages. Links to .md and .mdx files become page URLs, and a broken one fails the build.

The document tree

defineTree turns the collection into a tree, with ids autocompleted and a typo caught as a type error:

export const tree = await defineTree(entries, ({ page, group, dir }) => [
  page('index'),
  group('Guides', dir('guides')),
]);

The tree drives the sidebar, the previous and next links and breadcrumbs.

Parts

Layout, Sidebar, Toc, Pager, Callout, Search and Prose give the markup and behaviors, while the page structure stays in your code. @minidocs/astro/styles.css gives them a complete default look. See Getting Started.

Markdown and llms.txt

Every page can have a Markdown version, and llms.txt and llms-full.txt come from the same tree. See Markdown and llms.txt.

本页目录
搜索范围
输入关键词开始搜索