What is @docusaurus/plugin-content-blog?
@docusaurus/plugin-content-blog is a plugin for Docusaurus, a static site generator. This plugin allows you to create and manage a blog within your Docusaurus site. It provides features like blog post creation, pagination, tags, and more.
What are @docusaurus/plugin-content-blog's main functionalities?
Create Blog Posts
This feature allows you to create and manage blog posts in Markdown or MDX format. The configuration specifies the path to the blog directory, the route base path, and other settings like the blog title and description.
module.exports = {
plugins: [
[
'@docusaurus/plugin-content-blog',
{
path: './blog',
routeBasePath: '/blog',
include: ['*.md', '*.mdx'],
blogTitle: 'My Blog',
blogDescription: 'A Docusaurus powered blog!',
},
],
],
};
Pagination
This feature enables pagination for your blog posts. You can specify the number of posts per page using the `postsPerPage` option.
module.exports = {
plugins: [
[
'@docusaurus/plugin-content-blog',
{
path: './blog',
routeBasePath: '/blog',
postsPerPage: 10,
},
],
],
};
Tags
This feature allows you to categorize your blog posts using tags. The configuration can also include options to show reading time and customize the blog sidebar.
module.exports = {
plugins: [
[
'@docusaurus/plugin-content-blog',
{
path: './blog',
routeBasePath: '/blog',
showReadingTime: true,
blogSidebarCount: 'ALL',
blogSidebarTitle: 'All posts',
},
],
],
};
Other packages similar to @docusaurus/plugin-content-blog
hexo
Hexo is a fast, simple, and powerful blog framework. It provides a wide range of features for creating and managing blogs, including support for Markdown, extensive theming options, and plugins for additional functionalities. Unlike @docusaurus/plugin-content-blog, Hexo is a standalone framework rather than a plugin for a static site generator.
jekyll
Jekyll is a static site generator focused on blogging. It offers features like Markdown support, templates, and plugins. Jekyll is highly customizable and is often used for GitHub Pages. While it provides similar blogging functionalities, it is a standalone tool rather than a plugin for another static site generator like @docusaurus/plugin-content-blog.
2.0.0-alpha.38 (2019-12-06)
:boom: Breaking Change
docusaurus-plugin-content-blog
, docusaurus-plugin-content-docs
, docusaurus-plugin-content-pages
, docusaurus-theme-classic
, docusaurus-utils
- #2088 perf(v2): smaller bundlesize by embedding metadata to content (@endiliey)
If you have swizzled any Docs/Blog component that depends on metadata, you'll have to update. If you haven't, no action is needed.
For example, if you've swizzled @theme/DocItem
. You'll have to update
- const {metadata, content: DocContent} = props;
+ const {content: DocContent} = props;
+ const {metadata} = DocContent;
:bug: Bug Fix
docusaurus
docusaurus-plugin-ideal-image
- #2074 fix(v2): fix plugin-ideal-image breaking website (exports not defined) (@endiliey)
:nail_care: Polish
:house: Internal
docusaurus-1.x
docusaurus
- #2081 refactor(v2): move scripts/stylesheets injection to server side (@endiliey)
- #2080 refactor(v2): minor code refactoring on component creator (@endiliey)
:running_woman: Performance
docusaurus-utils
- #2089 perf(v2): improve dev build time by not overwriting file if possible (@endiliey)
docusaurus-theme-search-algolia
- #2079 perf(v2): algolia search result no longer cause full page refresh (@endiliey)
- #2076 perf(v2): load algolia JS only when user interacts with search (@endiliey)
Committers: 4