mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-01 07:49:43 +02:00
feat(plugin-blog): allow 'ALL'
as postsPerPage
option value (#5354)
* 'ALL' option Signed-off-by: Josh-Cena <sidachen2003@gmail.com> * Guard against zero posts Signed-off-by: Josh-Cena <sidachen2003@gmail.com> * Remove redundant code Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
This commit is contained in:
parent
ee6882650e
commit
7d0272fe4d
5 changed files with 17 additions and 11 deletions
|
@ -112,7 +112,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. 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 meta description to the blog list page for better SEO:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
module.exports = {
|
||||
|
@ -125,7 +125,7 @@ module.exports = {
|
|||
// highlight-start
|
||||
blogTitle: 'Docusaurus blog!',
|
||||
blogDescription: 'A Docusaurus powered blog!',
|
||||
postsPerPage: 20,
|
||||
postsPerPage: 'ALL',
|
||||
// highlight-end
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue