This website was created with Docusaurus.
You need at least node
and yarn
to get started with setting up a local development environment.
yarn install
.# Install dependencies $ yarn install
yarn start
in the website directory.# Start the site $ yarn run start:website
All the docs are located in the docs
folder.
"Versioned documents are placed into website/versioned_docs/version-${version}
, where ${version}
is the version number you supplied the version
script... If you wish to change the documentation for a past version, you can access the files for that respective version. (https://docusaurus.io/docs/en/versioning.html#storing-files-for-each-version)
“Documents in the docs
directory will be considered part of version next
and they are available, for example, at the URL docs/next/doc1.html
. Documents from the latest version use the URL docs/doc1.html
” (https://docusaurus.io/docs/en/versioning)
All the news are located in the website/blog/
folder.
Static assets used in documents and blog/news should go into docs/assets
and website/blog/assets
Edit docs by navigating to docs/
and editing the corresponding document:
docs/doc-to-be-edited.md
--- id: page-needs-edit title: This Doc Needs To Be Edited --- Edit me...
For more information about docs, click here
Edit blog posts by navigating to website/blog
and editing the corresponding post:
website/blog/post-to-be-edited.md
--- id: post-needs-edit title: This Blog Post Needs To Be Edited --- Edit me...
For more information about blog posts, click here
/docs
, example docs/newly-created-doc.md
:--- id: newly-created-doc title: This Doc Needs To Be Edited --- My new content here..
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
website/siteConfig.js
:website/siteConfig.js
headerLinks: [ ... { blog: true, label: 'Blog' }, ... ]
YYYY-MM-DD-My-Blog-Post-Title.md
in website/blog
:website/blog/2018-05-21-New-Blog-Post.md
--- author: Frank Li authorURL: https://twitter.com/foobarbaz authorFBID: 503283835 title: New Blog Post --- Lorem Ipsum...
For more information about blog posts, click here
website/siteConfig.js
: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
website/pages/en
:website/siteConfig.js
to add to the headerLinks
element:website/siteConfig.js
{ headerLinks: [ ... { page: 'my-new-custom-page', label: 'My New Custom Page' }, ... ], ... }
For more information about custom pages, click here.
“To create a static build of your website, run the following script from the website
directory: yarn run build # or npm run build
”
cd
to /website/build/singa-doc/
to serve the static files