apply async codemod

This commit is contained in:
Timothy Lin
2024-10-31 22:37:40 +08:00
parent c7c61a8609
commit 85fe09b13e
4 changed files with 14 additions and 11 deletions

View File

@ -47,9 +47,7 @@ async function generateRSS(config, allBlogs, page = 'feed.xml') {
if (publishPosts.length > 0) {
for (const tag of Object.keys(tagData)) {
const filteredPosts = allBlogs.filter((post) =>
post.tags.map((t) => slug(t)).includes(tag)
)
const filteredPosts = allBlogs.filter((post) => post.tags.map((t) => slug(t)).includes(tag))
const rss = generateRss(config, filteredPosts, `tags/${tag}/${page}`)
const rssPath = path.join(outputFolder, 'tags', tag)
mkdirSync(rssPath, { recursive: true })