Documentation
Docusaurus
The documentation for the project is generated through Docusaurus and then published through GitHub Pages. All the documentation is located in the /docs folder.
The documentation is split into three different types of content:
- blog - these are blog articles that are generated from markdown files here.
- docs - these are guides and tutorials that are generated from markdown files here.
- pages - these are single pages like the homepage and help page that generated from React components here.
The siteConfig.js file contains all of the site configurations like the baseURL, site title, Google Analytics code, etc. You can also customize the top navigation bar via the headerLinks
field.
The sidebars.js file contains the Sidebar configurations. It will create the left sidebar with relative pages when a page loads.
The Footer.js file contains the React component for the footer that is visible on every page.
The static folder contains the static assets like CSS and images used throughout the documentation.
Install the npm Dependencies
Install the npm dependencies for building the documentation from Docusaurus.
# Makefile
make doc-dep
# Manual
cd ${GOPATH}/docs/website
npm install
Run the Docusaurus Live Server
Run the server that displays the documentation locally. Changes are made without having to reload, but you must kill and re-run the commands when you make changes to the sidebars.js file.
# Makefile
make doc-dev
# Manual
cd ${GOPATH}/docs/website
npm start
Publish the Documentation to GitHub Pages
Push the changes from the master branch to GitHub pages for the specified user.
# Makefile
make doc-publish
# Manual
cd ${GOPATH}/docs/website
GIT_USER=josephspurrier CURRENT_BRANCH=master USE_SSH=true npm run publish-gh-pages