This commit is contained in:
Zoe
2023-02-10 23:05:26 -06:00
parent 0018011cd3
commit fb357cb768
5 changed files with 12 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
import { serverQueryContent } from '#content/server'
import { streamToPromise } from 'sitemap'
import RSS from 'rss'
export default defineEventHandler(async (event) => {

View File

@@ -3,7 +3,7 @@ import { SitemapStream, streamToPromise } from 'sitemap'
export default defineEventHandler(async (event) => {
// Fetch all documents
const docs = await serverQueryContent(event).find()
const docs = await serverQueryContent(event).where({ _draft: false }).find()
const sitemap = new SitemapStream({
hostname: 'https://juls07.dev'
})