Helium Documentation Installation Guide
Clone the docs repo from Github.
$ git clone https://github.com/helium/docs.git
Navigate to the docs
directory
$ cd docs/
Prerequisites
Install Node.js
Download and install the latest version of Node.js.
$ node --version
v18.16.0
Windows users installing Node.js do not need to install the Compiler
nor Chocolaty
dependencies.
Install Yarn
After installing Node.js, npm will be installed and can be used to install Yarn.
$ npm install -g yarn
> yarn@1.22.11 preinstall /path/to/npm/node_modules/yarn
> :; (node ./preinstall.js > /dev/null 2>&1 || true)
To upgrade the Yarn version to be >= 1.5, set the project directory to version berry
.
$ yarn set version berry
➤ YN0000: Retrieving https://repo.yarnpkg.com/3.5.1/packages/yarnpkg-cli/bin/yarn.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-3.5.1.cjs
➤ YN0000: Done in 0s 430ms
Install Dependencies
Install Yarn which will download and compile all the project module dependencies.
$ yarn install
➤ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker 👍
➤ YN0000: ┌ Resolution step
...
➤ YN0000: └ Completed in 4s 287ms
➤ YN0000: ┌ Fetch step
...
➤ YN0000: └ Completed in 9s 723ms
➤ YN0000: ┌ Link step
...
➤ YN0000: └ Completed in 8s 494ms
➤ YN0000: Done with warnings in 22s 635ms
Check the final version and confirm that it is >= 1.5
$ yarn --version
3.5.1
Local Development
$ yarn start
[INFO] Starting the development server...
[SUCCESS] Docusaurus website is running at: http://localhost:3000/
✔ Client
Compiled successfully in 25.06s
client (webpack 5.76.3) compiled successfully
✔ Client
Compiled successfully in 542.45ms
client (webpack 5.76.3) compiled successfully
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
Auto Refresh
Each time a file is saved the site will get rebuilt and the pages refreshed on the fly, there is no need to keep restarting Yarn.
Link Checking Before Creating a Pull Request
Checking links can be accomplished by using the yarn build
command
$ yarn build
[INFO] [en] Creating an optimized production build...
✔ Client
✔ Server
Compiled successfully in 30.22s
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
✔ Client
● Server █████████████████████████ cache (99%) shutdown IdleFileCachePlugin
stored
[SUCCESS] Generated static files in "build".
[INFO] Use `npm run serve` command to test your build locally.