added dockerfile and made changes to attempt to build successfully

This commit is contained in:
2024-10-16 09:05:54 -05:00
parent 2314102d70
commit f16543e1d3
3 changed files with 68 additions and 5 deletions

View File

@ -3,7 +3,7 @@ import path from 'path'
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' }
import tagData from '../app/tag-data.json' with { type: 'json' }
import { allBlogs } from '../.contentlayer/generated/index.mjs'
import { sortPosts } from 'pliny/utils/contentlayer.js'
@ -45,9 +45,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('public', 'tags', tag)
mkdirSync(rssPath, { recursive: true })