Skip to content

Commit 14bdd05

Browse files
committed
feat: add blog plugin with reading time and feed options
- Integrated `@docusaurus/plugin-content-blog` with reading time display. - Configured feed to include a maximum of 10 blog posts and added copyright metadata.
1 parent 7f3e638 commit 14bdd05

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

packages/theme/src/config/docusaurus.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,24 @@ export const sharedPlugins = [
135135
disableInDev: false,
136136
},
137137
],
138+
// Blog plugin with safe defaults
139+
[
140+
'@docusaurus/plugin-content-blog',
141+
{
142+
showReadingTime: true,
143+
feedOptions: {
144+
type: 'all',
145+
copyright: `Copyright © ${new Date().getFullYear()} IFLA.`,
146+
createFeedItems: async (params: any) => {
147+
const { blogPosts, defaultCreateFeedItems, ...rest } = params;
148+
return defaultCreateFeedItems({
149+
blogPosts: blogPosts.filter((item: any, index: number) => index < 10),
150+
...rest,
151+
});
152+
},
153+
},
154+
},
155+
],
138156
];
139157

140158
// Shared themes - only search which all sites use

0 commit comments

Comments
 (0)