craftcms / docs

Documentation for Craft CMS, Craft Commerce, and other official products.
https://craftcms.com/docs
38 stars 144 forks source link
craftcms documentation vuepress

Craft Docs

This project includes all project documentation and tutorials at craftcms.com/docs. It does not include class reference documentation.

It consists of markdown content in nested docs/ folders, and a highly customized VuePress theme in docs/.vuepress/. The theme is comprised of single-file Vue components just like the VuePress default, but integrates PostCSS with Tailwind CSS to replace most of the Stylus used by VuePress.

Overview

The major change in this theme is the concept of documentation “sets”, meant to define a documentation “product” that may have one or several versions. Each can be configured as a “primary set,” meaning it appears as a top-level sidebar item. Navigation and search are unique to each set, sort of like the VuePress equivalent of Craft’s multi-site functionality.

The only content not part of a docset is the homepage at docs/README.md.

The pages served from docs/ are treated like any other VuePress project, and the theme modifies resolvers so any displayed content is assumed to be part of an active set once selected.

Local Development

npm install
npm run docs:dev

Quit the process and re-run if you’ve made changes to any .js config files.

Writing Tips

Most stock VuePress Markdown extensions are supported here. See the Markdown Extensions page to learn more about linking, frontmatter, and highlighting lines in code samples.