mirror of
https://github.com/meshtastic/meshtastic.git
synced 2024-09-19 23:57:31 -07:00
blog images into rss feed
This commit is contained in:
parent
0016a4d28b
commit
4c70389b13
|
@ -134,6 +134,25 @@ const config = {
|
|||
blogTitle: "Meshtastic Blog",
|
||||
blogDescription:
|
||||
"Discover in-depth insights from developers and maintainers, including project updates and changes. Hear from the community about their projects and ideas.",
|
||||
feedOptions: {
|
||||
type: "rss",
|
||||
createFeedItems: async ({ blogPosts, siteConfig, ...params }) => {
|
||||
const feedItems = await params.defaultCreateFeedItems({
|
||||
blogPosts,
|
||||
siteConfig,
|
||||
...params,
|
||||
});
|
||||
feedItems.forEach((feedItem, index) => {
|
||||
const blogPost = blogPosts[index];
|
||||
const imageUrl = blogPost.metadata.frontMatter.image
|
||||
? new URL(blogPost.metadata.frontMatter.image, siteConfig.url)
|
||||
.href
|
||||
: null;
|
||||
feedItem.image = imageUrl;
|
||||
});
|
||||
return feedItems;
|
||||
},
|
||||
},
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve("./src/css/custom.css"),
|
||||
|
|
Loading…
Reference in a new issue