Skip to main content

Writing docs

This site is built with Docusaurus from the FinpeakInc/Frevana-docs repository.

Publishing​

Every push to main builds the site and deploys it to docs.frevana.com automatically, usually within a minute or two. Progress is shown on the repository's Actions tab.

Adding a page​

  1. Create a .md (or .mdx) file under docs/.

  2. Give it front matter for its title and position in the sidebar:

    ---
    sidebar_position: 2
    title: My page
    ---
  3. The file path becomes the URL: docs/guides/setup.md is served at /guides/setup.

The sidebar is generated from the folder structure. Each folder is a sidebar group; set its label and order in a _category_.json file inside the folder:

{
"label": "Guides",
"position": 2
}

Put images next to the page that uses them and link them with a relative path.

Previewing locally​

npm install
npm start

Open http://localhost:3000. Pages reload as you edit. Run npm run build before pushing to catch broken links, which fail the build.