Code Monkey home page Code Monkey logo

docs's Introduction

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.

  • docs/
    • .vuepress/
      • public/ for static files to be published with the build.
      • sets/ for our docset configurations.
      • theme/ all the JavaScript, Vue, PostCSS and Stylus for the custom VuePress theme.
      • anchor-prefixes.js: configuration for abbreviated link shortcuts like yii2: and craft3:.
      • config.js is the root VuePress configuration.
      • head.js for customizing global <head> contents for published pages.
      • placeholders.js for configuring special placeholders to be emphasized in code samples.
    • */ docset Markdown as you’d see it on its own in each legacy VuePress project.
    • README.md the topmost homepage for all docsets.
  • postcss.config.js
  • tailwind.config.js

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.

  • Keep code block line lengths up to 85 characters long to avoid horizontal scrollbars.
  • Avoid placing highlighted code blocks ::: details toggles because the performance is terrible in WebKit. Use our height-limited <toggle-tip> component instead.

docs's People

Contributors

ademers avatar akshayagarwal avatar andris-sevcenko avatar angrybrad avatar augustmiller avatar bencroker avatar benface avatar billythekid avatar brandonkelly avatar carlcs avatar dependabot[bot] avatar dreamseeker avatar gtettelaar avatar jamesedmonston avatar janhenckens avatar jasonmccallister avatar lindseydiloreto avatar lukeholder avatar makeilalundy avatar mattstein avatar missmatsuko avatar nfourtythree avatar olivierbon avatar saboteur777 avatar samhernandez avatar shinybrad avatar snyk-bot avatar timkelty avatar vnali avatar xhmikosr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.