ray5273 / docusaurus-template

docusaurus-template
https://ray5273.github.io/docusaurus-template/
0 stars 0 forks source link

Docusaurus Template

This is a template for a Docusaurus site. It is a simple site with a few pages and a blog.

including following features:

  1. Create a sidebar with a list of pages based on the files in the docs directory.
  2. Added versioned docs example with 1.0.0 version.
  3. Added code highlighting (syntax highlighting) to the code blocks in the markdown files (cpp, golang)
  4. Search functionality (only works in production build and english language)

How to use this template

  1. Generate sidebar based on the files in the docs directory.

    npm run generateSidebar
    • This will generate a sidebar based on the files in the docs directory and save it to the sidebars.json file in root directory.
  2. Start the development server.

    npm run start
  3. Build the site.

    npm run build
  4. Serve the site.

    npm run serve

How to add a new version

npm run docusaurus docs:version {version}

How to generate api docs

npm run docusaurus gen-api-docs all