The Golioth documentation website is built using Docusaurus 2.
Please use the .editorconfig file when editing/adding documentation. This will
instruct your code editor to follow some simple formatting guidelines such as:
- Max column width of 80 characters (where possible)
- UTF-8 character set
- Use linefeed as the end-of-line treatment
Formatting can be enabled automatically in VS Code by enabling the following Plugins:
- EditorConfig
for VS Code: Automatically uses the
.editorconfigfile - Rewrap:
Enable the
Rewrap>Auto Wrapsetting to hard wrap at the 80 character max line width.
A pre-configured VS Code instance is available by clicking the Gitpod badge to open a contributor workspace instance:
Automatic hard wrapping in this Gitpod instance can be turned on by pressing
CTRL comma to open settings, then search for rewrap auto wrap.
EditorConfig is supported natively in Neovim. Support can be added to Vim using the editorconfig-vim plugin.
Hard breaks will be added to lines automatically and you can manually reflow
paragraphs using qgap and sentences using gqas.
npm installnpm startThis command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
npm run build:dev (or :prod)This command generates static content into the build directory and can be
served using any static contents hosting service.
The device catalog is automatically generated. To update it, run this command from the project root directory:
npm run build-device-catalogQuickstart guides can be added in the docs/hardware/6-catalog/quickstart
directory and enabled by adding a node in the
scripts/device-catalog/support.json file.
Documentation on automatic generation and adding customized pages for supported boards can be found in the device catalog README.
Deploy to Golioth Docs Dev site
npm run fb-deploy-devDeploy to Golioth Docs Prod Site
npm run fb-deploy-prodMaintainers of the Golioth docs merging into the main branch will also
automatically deploy to production (based on the CI system setup)
In Ubuntu, the default npm install will not be up to date with the required npm packages. Consider using nvm to choose an LTS solution that will work better with Docusaurus V2.