mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-04 20:02:54 +02:00
docs(v2): proofread docs (#2527)
This commit is contained in:
parent
692ab14e4f
commit
3dd83be988
14 changed files with 118 additions and 95 deletions
|
@ -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 ''.
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue