CC

chromaui/chromatic-docs

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

5 stars 质量 56 趋势 33

Chromatic documentation site

概览

The main branch is automatically deployed to https://www.chromatic.com/docs/ Available at docs.chromatic.com and via Netlify's build previews on branches/PRs. The 'website' proxies this to https://www.chromatic.com/docs/ To configure, access the Netlify dashboard. This project uses Astro. Inside, you'll see the following folders and files: All commands are run from the root of the project, from a terminal: Every pnpm build regenerates dist/llms.txt, dist/llms-full.txt, and dist/llms/ .txt from the rendered articles. This includes FAQs, CMS pages, imported snippets, generated references, all tab panels, and disclosures. Removed articles are removed from the exports on the next build. Pages in notInNavigation and pages marked isHidden retain individual text exports but are excluded from the index and full corpus. The exporter checks article identities, nonempty content, and coverage consistency before the build succeeds.

README

以下为原文 README 节选,完整内容请查看原文。

Chromatic docs

The main branch is automatically deployed to https://www.chromatic.com/docs/

Deployment

Available at docs.chromatic.com and via Netlify’s build previews on branches/PRs. The ‘website’ proxies this to https://www.chromatic.com/docs/

To configure, access the Netlify dashboard.

Deploy previews are set up for PRs.

🚀 Project Structure

This project uses Astro. Inside, you’ll see the following folders and files:

/
├── public/
│   └── favicon.svg
├── src/
│   ├── content/
│   ├── getStarted/
│   │   └── introduction.md
│   ├── notInNavigation/
│   ├── components/
│   │   └── Card.astro
│   ├── layouts/
│   │   └── BaseLayout.astro
│   └── pages/
│       └── index.astro
└── package.json

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
pnpm install Installs dependencies
pnpm dev Starts local dev server at localhost:4321
pnpm build Build your production site to ./dist/
pnpm preview Preview your build locally, before deploying
pnpm astro ... Run CLI commands like astro add, astro check
pnpm astro -- --help Get help using the Astro CLI
pnpm diagrams Render all diagrams/*.mmd files to SVG
pnpm diagrams:watch Watch diagrams/ and re-render on save

LLM documentation exports

Every pnpm build regenerates dist/llms.txt, dist/llms-full.txt, and dist/llms/.txt from the rendered articles. This includes FAQs, CMS pages, imported snippets, generated references, all tab panels, and disclosures. Removed articles are removed from the exports on the next build.

Pages in notInNavigation and pages marked isHidden retain individual text exports but are excluded from the index and full corpus. The exporter checks article identities, nonempty content, and coverage consistency before the build succeeds.

Use pnpm build followed by pnpm preview to inspect the exports under /docs/ and test Copy Markdown. Exports are not served during pnpm dev, where Copy Markdown is hidden.

✍️ Editing Content

Try to follow the conventions present.

⚠️ Note: Prettier doesn’t yet support MDX v2 so, for now, you’ll need to format nested code snippets manually and wrap them with prettier-ignore. For example:

{/* prettier-ignore-start */}

  
    ```bash
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add chromaui/chromatic-docs
新手?先看 mcpskill.org 教程 →