Documentation for the Helium network.
$ yarn
$ yarn start
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
Documentation is managed by Helium, but supported by the community.
Please see CONTRIBUTING.md for more instructions.
When authoring a new doc, be sure to apply prettier
to it during review. For
example: npx prettier --write --prose-wrap always docs/blockchain/new_doc.mdx
It will apply appropriate line wraps and other formatting niceties.
When editing an existing doc, line wrap should not be applied (don't run
prettier
), and lines that run wider than 80 chars in width are okay. Applying
prettier
would cause many unimportant line changes and make review more
difficult.
Instead, from time to time, prettier
will be run against the documents and
those unimportant commits will be added to .git-blame-ignore-revs
Use the style guide found here to learn what markdown syntax is available.
For more advanced content consider using JSX.
When linking to other docs always use full path links or abbreviated links to full path links at the bottom of the doc. Abbreviated links help improve readability of the raw markdown and makes common links reusable in the same doc.
Abbreviated Links Example:
If you would like to link to the development devices introduction page found at
/use-the-network/devices/development
, use
[development devices][devices.development]
inline with your text content.
Next, create the link to the full path at the very bottom of the doc markdown
like this [devices.development]: /use-the-network/devices/development
.
When adding images, use the method shown below.
---
id: my-doc
title: My Doc
---
// Add to the top of the file below the front matter.
import useBaseUrl from '@docusaurus/useBaseUrl';
...
<img alt="Image Description" src={useBaseUrl('img/image.svg')} />
When naming images with multiple words, use -
to separate the words only.
Create a new *.mdx extension file following the existing naming conventions.
When creating a new doc, use the following front matter at the very top of the doc with the following fields:
id:
This should match the filename without the extension.
hide_title:
Always set this true.
sidebar_label:
This should match id name but with spaces and capitalized
first letters.
---
id: devices
hide_title: true
sidebar_label: Devices
---
slug:
If the doc id path has repeated sections like the following doc path
use-the-network/devices/devices
, define a slug:
field in the front matter to
make it pretty as shown below. This way when this doc is navigated to, the URL
shown will not have repeating sections names in it.
slug: use-the-network/devices
yarn build
does a good job of checking for dead links.
TODO: add to CI
Learn how to create sidebar links here.
When adding items use the raw id path, slug paths will not work.
This website is built using Docusaurus 2, a modern static website generator.