mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
docs: audit grammar issues (#6203)
* docs: audit grammar mistakes * fix code block language * revert change * let's get another
This commit is contained in:
parent
3195e7feed
commit
73ee356949
56 changed files with 432 additions and 383 deletions
|
@ -16,7 +16,7 @@ Check the [Blog Plugin API Reference documentation](./api/plugins/plugin-content
|
|||
|
||||
## Initial setup {#initial-setup}
|
||||
|
||||
To setup your site's blog, start by creating a `blog` directory.
|
||||
To set up your site's blog, start by creating a `blog` directory.
|
||||
|
||||
Then, add an item link to your blog within `docusaurus.config.js`:
|
||||
|
||||
|
@ -41,7 +41,7 @@ To publish in the blog, create a Markdown file within the blog directory.
|
|||
|
||||
For example, create a file at `website/blog/2019-09-05-hello-docusaurus-v2.md`:
|
||||
|
||||
```yml title="website/blog/2019-09-05-hello-docusaurus-v2.md"
|
||||
```md title="website/blog/2019-09-05-hello-docusaurus-v2.md"
|
||||
---
|
||||
title: Welcome Docusaurus v2
|
||||
description: This is my first post on Docusaurus 2.
|
||||
|
@ -59,6 +59,7 @@ tags: [hello, docusaurus-v2]
|
|||
image: https://i.imgur.com/mErPwqL.png
|
||||
hide_table_of_contents: false
|
||||
---
|
||||
|
||||
Welcome to this blog. This blog is created with [**Docusaurus 2**](https://docusaurus.io/).
|
||||
|
||||
<!--truncate-->
|
||||
|
@ -72,7 +73,7 @@ A whole bunch of exploration to follow.
|
|||
|
||||
Docusaurus will extract a `YYYY-MM-DD` date from a file/folder name such as `YYYY-MM-DD-my-blog-post-title.md`.
|
||||
|
||||
This naming convention is optional, and you can provide the date as FrontMatter.
|
||||
This naming convention is optional, and you can provide the date as front matter.
|
||||
|
||||
<details>
|
||||
<summary>Example supported patterns</summary>
|
||||
|
@ -104,10 +105,11 @@ The blog's index page (by default, it is at `/blog`) is the _blog list page_, wh
|
|||
|
||||
Use the `<!--truncate-->` marker in your blog post to represent what will be shown as the summary when viewing all published blog posts. Anything above `<!--truncate-->` will be part of the summary. For example:
|
||||
|
||||
```yml
|
||||
```md
|
||||
---
|
||||
title: Truncation Example
|
||||
---
|
||||
|
||||
All these will be part of the blog post summary.
|
||||
|
||||
Even this.
|
||||
|
@ -121,7 +123,7 @@ Not this.
|
|||
Or this.
|
||||
```
|
||||
|
||||
By default, 10 posts are shown on each blog list page, but you can control pagination with the `postsPerPage` option in the plugin configuration. If you set `postsPerPage: 'ALL'`, pagination will be disabled and all posts will be displayed on the first page. You can also add meta description to the blog list page for better SEO:
|
||||
By default, 10 posts are shown on each blog list page, but you can control pagination with the `postsPerPage` option in the plugin configuration. If you set `postsPerPage: 'ALL'`, pagination will be disabled and all posts will be displayed on the first page. You can also add a meta description to the blog list page for better SEO:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
module.exports = {
|
||||
|
@ -147,7 +149,7 @@ module.exports = {
|
|||
|
||||
The blog sidebar displays recent blog posts. The default number of items shown is 5, but you can customize with the `blogSidebarCount` option in the plugin configuration. By setting `blogSidebarCount: 0`, the sidebar will be completely disabled, with the container removed as well. This will increase the width of the main container. Specially, if you have set `blogSidebarCount: 'ALL'`, _all_ posts will be displayed.
|
||||
|
||||
You can also alter the sidebar heading text with the `blogSidebarTitle` option. For example, if you have set `blogSidebarCount: 'ALL'`, instead of the default "Recent posts", you may would rather make it say "All posts":
|
||||
You can also alter the sidebar heading text with the `blogSidebarTitle` option. For example, if you have set `blogSidebarCount: 'ALL'`, instead of the default "Recent posts", you may rather make it say "All posts":
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
module.exports = {
|
||||
|
@ -169,11 +171,11 @@ module.exports = {
|
|||
|
||||
## Blog post authors {#blog-post-authors}
|
||||
|
||||
Use the `authors` FrontMatter field to declare blog post authors.
|
||||
Use the `authors` front matter field to declare blog post authors.
|
||||
|
||||
### Inline authors {#inline-authors}
|
||||
|
||||
Blog post authors can be declared directly inside the FrontMatter:
|
||||
Blog post authors can be declared directly inside the front matter:
|
||||
|
||||
````mdx-code-block
|
||||
<Tabs groupId="author-frontmatter">
|
||||
|
@ -218,7 +220,7 @@ This option works best to get started, or for casual, irregular authors.
|
|||
|
||||
:::info
|
||||
|
||||
Prefer usage of the `authors` FrontMatter, but the legacy `author_*` FrontMatter remains supported:
|
||||
Prefer using the `authors` front matter, but the legacy `author_*` front matter remains supported:
|
||||
|
||||
```yml title="my-blog-post.md"
|
||||
---
|
||||
|
@ -233,9 +235,9 @@ author_image_url: https://github.com/JoelMarcey.png
|
|||
|
||||
### Global authors {#global-authors}
|
||||
|
||||
For regular blog post authors, it can be tedious to maintain authors information inlined in each blog post.
|
||||
For regular blog post authors, it can be tedious to maintain authors' information inlined in each blog post.
|
||||
|
||||
It is possible declare those authors globally in a configuration file:
|
||||
It is possible to declare those authors globally in a configuration file:
|
||||
|
||||
```yml title="website/blog/authors.yml"
|
||||
jmarcey:
|
||||
|
@ -257,7 +259,7 @@ Use the `authorsMapPath` plugin option to configure the path. JSON is also suppo
|
|||
|
||||
:::
|
||||
|
||||
In blog posts FrontMatter, you can reference the authors declared in the global configuration file:
|
||||
In blog posts front matter, you can reference the authors declared in the global configuration file:
|
||||
|
||||
````mdx-code-block
|
||||
<Tabs groupId="author-frontmatter">
|
||||
|
@ -393,7 +395,7 @@ module.exports = {
|
|||
|
||||
Usage:
|
||||
|
||||
```yml "my-blog-post.md"
|
||||
```md "my-blog-post.md"
|
||||
---
|
||||
hide_reading_time: true
|
||||
---
|
||||
|
@ -552,7 +554,7 @@ Don't forget to delete the existing homepage at `./src/pages/index.js` or else t
|
|||
|
||||
:::tip
|
||||
|
||||
There's also a "Docs-only mode" for those who only want to use the docs. Read [Docs-only mode](./guides/docs/docs-introduction.md) for detailed instructions or a more elaborated explanation of `routeBasePath`.
|
||||
There's also a "Docs-only mode" for those who only want to use the docs. Read [Docs-only mode](./guides/docs/docs-introduction.md) for detailed instructions or a more elaborate explanation of `routeBasePath`.
|
||||
|
||||
:::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue