📦 plugin-content-blog
Provides the Blog feature and is the default blog plugin for Docusaurus.
some features production only
The feed feature works by extracting the build output, and is only active in production.
Installation
- npm
- Yarn
- pnpm
- Bun
npm install --save @docusaurus/plugin-content-blog
yarn add @docusaurus/plugin-content-blog
pnpm add @docusaurus/plugin-content-blog
bun add @docusaurus/plugin-content-blog
tip
If you use the preset @docusaurus/preset-classic, you don't need to install this plugin as a dependency.
You can configure this plugin through the preset options.
Configuration
Accepted fields:
| Name | Type | Default | Description |
|---|---|---|---|
path | string | 'blog' | Path to the blog content directory on the file system, relative to site dir. |
editUrl | string | EditUrlFn | undefined | Base URL to edit your site. The final URL is computed by editUrl + relativePostPath. Using a function allows more nuanced control for each file. Omitting this variable entirely will disable edit links. |
editLocalizedFiles | boolean | false | The edit URL will target the localized file, instead of the original unlocalized file. Ignored when editUrl is a function. |
blogTitle | string | 'Blog' | Blog page title for better SEO. |
blogDescription | string | 'Blog' | Blog page meta description for better SEO. |
blogSidebarCount | number | 'ALL' | 5 | Number of blog post elements to show in the blog sidebar. 'ALL' to show all blog posts; 0 to disable. |
blogSidebarTitle | string | 'Recent posts' | Title of the blog sidebar. |
routeBasePath | string | 'blog' | URL route for the blog section of your site. |