Using your git gui, clone this repository to your computer. When prompted for a repository location, use:
https://github.com/algorithmic-freelancers/docs.git
Navigate to the /website folder in the repository. Open a command prompt using Shift+Right-click
# Install dependencies
$ npm installNavigate to the /website folder
# Start the site
$ yarn startYour project file structure should look something like this
docs/
guide/
doc-1.md
doc-2.md
doc-3.md
some-folder/
doc-4
doc-5
website/
blog/
2016-3-11-oldest-post.md
2017-10-24-newest-post.md
core/
node_modules/
pages/
static/
css/
img/
package.json
sidebar.json
siteConfig.js
Edit docs by navigating to guide/ and editing the corresponding document:
guide/doc-to-be-edited.md
---id: page-needs-edittitle: 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-edittitle: This Blog Post Needs To Be Edited---
Edit me...For more information about blog posts, click here
- Create the doc as a new markdown file in
/guide, exampleguide/newly-created-doc.md:
---id: newly-created-doctitle: 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
- Make sure there is a header link to your blog in
website/siteConfig.js:
website/siteConfig.js
headerLinks: [
...
{blog: true,label: 'Blog'},
...
]- Create the blog post with the format
YYYY-MM-DD-My-Blog-Post-Title.mdinwebsite/blog:
website/blog/2018-05-21-New-Blog-Post.md
---author: Frank LiauthorURL: https://twitter.com/foobarbazauthorFBID: 503283835title: New Blog Post---
Lorem Ipsum...For more information about blog posts, click here
- Add links to docs, custom pages or external links by editing the headerLinks field of
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
- 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.jsto add to theheaderLinkselement:
website/siteConfig.js
{headerLinks: [
...
{page: 'my-new-custom-page',label: 'My New Custom Page'},
...
],
...
}For more information about custom pages, click here.
Full documentation can be found on the website.