Closed uarefans closed 5 months ago
Hey! How exactly do you write the cover image functions? Keeps returning undefined for me...
Thank you for sharing! The way frontmatter is handled has been rearchitected to make things easier.
Contributors (or people just hacking for their own use) can more easily add frontmatter by following this example.
End users can add/remove/alias frontmatter fields by editing frontmatter_fields
in settings.js.
Maybe we need some data from wordpress like user_id, or category_id and etc. The key is in xml files from wordpress. So yo have to
<item>
<item>...</item>
// for author name
// Add function getPostAuthor(post) { return post.author[0]; }
// Add function getPostAuthorId(post) { return post.authorid[0]; }
// Edit // Find frontmatter: // And Add like this frontmatter: { id: getPostId(post), date: getPostDate(post), authorid: getPostAuthorId(post), author: getPostAuthor(post), slug: getPostSlug(post), title: getPostTitle(post), categories: getCategories(post), tags: getTags(post), },
id: "12345" date: "2022-02-22" authorid: "11" author: "AAAAAAAA" slug: "magic-nexea-partnership-elevates-the-growth-of-startups-to-a-total-of-rm41mil-combined-revenues" title: "MaGIC-NEXEA partnership elevates the growth of startups to a total of RM41mil combined revenues" categories:
"Two" coverImage: "xxxxx.jpg"
KUALA LUMPUR, MALAYSIA - Media OutReach - 11 February 2022 - NEXEA's Entrepreneurs Programme and Malaysian Global Innovation and Creativity Centre (MaGIC) renewed their partnership to continue helping startups grow their businesses during this challenging time. Despite the pandemic, the Entrepreneurs Programme continues to provide a platform for tech entrepreneurs to connect with peers and like-minded individuals in an opportunity to grow, gain knowledge, and develop themselves for success.