This website was created with Docusaurus.
- Publishing Updates
- Running Locally
- Directory Structure
- Editing Content
- Adding Content
- Publishing the Website
- Full Documentation
Our continuous integration service, Jenkins, will auto-publish any changes pushed to the master branch.
Install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Yarn:
brew install yarn
Change to the website
directory:
cd website
Make sure all the dependencies for the website are installed:
yarn
Run your dev server:
yarn start
To stop the local server use ctrl+c
. You may need to stop and restart the server if you make site
config changes or add/remove a page. Any changes to text should not require the server to be
restarted (they are live-reloaded).
Your project file structure should look something like this
my-docusaurus/
docs/
doc-1.md
doc-2.md
doc-3.md
website/
core/
node_modules/
pages/
static/
css/
img/
package.json
sidebar.json
siteConfig.js
Edit docs by navigating to docs/
and editing the corresponding document:
docs/doc-1.md
---
id: this-is-a-page-id
title: This is the document title
---
Edit me...
For more information about docs, click here
Create the doc as a new markdown file in /docs
, example docs/newly-created-doc.md
:
---
id: newly-created-doc
title: This Doc Needs To Be Edited
---
My new content here..
Refer to that doc's ID in an existing sidebar in website/sidebar.json
:
// Add newly-created-doc to the Getting Started category of docs
{
"docs": {
"Getting Started": [
"quick-start",
"newly-created-doc" // new doc here
],
...
},
...
}
For more information about adding new docs, click here
Add links to docs, custom pages or external links by editing the headerLinks field of
website/siteConfig.js
:
{
headerLinks: [
...
/* you can add docs */
{ doc: 'my-examples', label: 'Examples' },
/* you can add custom pages */
{ page: 'help', label: 'Help' },
/* you can add external links */
{ href: 'https://github.com/facebook/Docusaurus', label: 'GitHub' },
...
],
...
}
For more information about the navigation bar, click here
Docusaurus uses React components to build pages. The components are saved as .js files in
website/pages/en
:
If you want your page to show up in your navigation header, you will need to update
website/siteConfig.js
to add to the headerLinks
element:
{
headerLinks: [
...
{ page: 'my-new-custom-page', label: 'My New Custom Page' },
...
],
...
}
For more information about custom pages, click here.
To cut a new version, run the following command whilst in the website
directory:
yarn new-version x.x.x
Versioning requires a hardcoded homepage (in the website/pages/en/versions.js
file). This is
currently set to intro
. This will need to be updated if intro.md
is renamed.
Full documentation can be found on the website.