-
|
I'm glad now it has JSON feed support so I can fetch posts programmatically: #6126 But it seems the JSON feed output does not contain tags. Any easy way how to add/hook to support this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
One way would to be to write your own json file, by extending the blog plugin: #4138 (comment) IE you'd be responsible for converting a blog post into the json file, like we do here: async postBuild({outDir}: Props) {
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);
if (!blogPosts.length) {
return;
}
await createBlogFeedFiles({
blogPosts,
options,
outDir,
siteConfig,
});
},It may not be convenient in the current state (cf TODO): we should provide Does it make sense? |
Beta Was this translation helpful? Give feedback.
-
|
#6388 this has been implemented! |
Beta Was this translation helpful? Give feedback.
#6388 this has been implemented!