feat: upgrade next 14.1, tailwind 3.4 and pliny 0.1.7
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { writeFileSync, mkdirSync } from 'fs'
|
||||
import path from 'path'
|
||||
import GithubSlugger from 'github-slugger'
|
||||
import { slug } from 'github-slugger'
|
||||
import { escape } from 'pliny/utils/htmlEscaper.js'
|
||||
import siteMetadata from '../data/siteMetadata.js'
|
||||
import tagData from '../app/tag-data.json' assert { type: 'json' }
|
||||
@ -46,7 +46,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) => GithubSlugger.slug(t)).includes(tag)
|
||||
post.tags.map((t) => slug(t)).includes(tag)
|
||||
)
|
||||
const rss = generateRss(config, filteredPosts, `tags/${tag}/${page}`)
|
||||
const rssPath = path.join('public', 'tags', tag)
|
||||
|
Reference in New Issue
Block a user