docs(v2): proofread docs (#2527)

This commit is contained in:
Yangshun Tay 2020-04-04 14:05:59 +08:00 committed by GitHub
parent 692ab14e4f
commit 3dd83be988
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 118 additions and 95 deletions

View file

@ -9,12 +9,19 @@ To setup your site's blog, start by creating a `blog` directory.
Then, add a navbar link to your blog within `docusaurus.config.js`:
```js
links: [
...
{to: 'blog', label: 'Blog', position: 'left'}, // or position: 'right'
...
]
```js title="docusaurus.config.js"
module.exports = {
themeConfig: {
// ...
navbar: {
links: [
// ...
// highlight-next-line
{to: 'blog', label: 'Blog', position: 'left'}, // or position: 'right'
],
},
},
};
```
## Adding posts
@ -128,7 +135,7 @@ https://{your-domain}/blog/atom.xml
### Blog-only mode
You can run your Docusaurus 2 site without a landing page and instead have your blog's post list page as the index page. Set the `routeBasePath` to be `'/'` to indicate it's the root path.
You can run your Docusaurus 2 site without a landing page and instead have your blog's post list page as the index page. Set the `routeBasePath` to be `''` to indicate it's the root path.
**Note:** Make sure there's no `index.js` page in `src/pages` or else there will be two files mapping to the same route!
@ -141,7 +148,7 @@ module.exports = {
{
blog: {
path: './blog',
routeBasePath: '/', // Set this value to '/'.
routeBasePath: '', // Set this value to ''.
},
},
],