mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-28 05:58:38 +02:00
fix(content-blog): generate feed by reading build output (#6454)
This commit is contained in:
parent
ebd5340205
commit
76a8d5f38a
28 changed files with 364 additions and 249 deletions
|
@ -36,7 +36,6 @@ import {PluginOptionSchema} from './pluginOptionSchema';
|
|||
import type {
|
||||
LoadContext,
|
||||
ConfigureWebpackUtils,
|
||||
Props,
|
||||
Plugin,
|
||||
HtmlTags,
|
||||
OptionValidationContext,
|
||||
|
@ -512,14 +511,11 @@ export default async function pluginContentBlog(
|
|||
};
|
||||
},
|
||||
|
||||
async postBuild({outDir}: Props) {
|
||||
async postBuild({outDir, content}) {
|
||||
if (!options.feedOptions.type) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: we shouldn't need to re-read the posts here!
|
||||
// postBuild should receive loadedContent
|
||||
const blogPosts = await generateBlogPosts(contentPaths, context, options);
|
||||
const {blogPosts} = content;
|
||||
if (!blogPosts.length) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue