and removed drafts from the rss

This commit is contained in:
Zoe
2023-02-10 22:38:03 -06:00
parent 0e7290a210
commit 0018011cd3

View File

@@ -3,7 +3,7 @@ import RSS from 'rss'
export default defineEventHandler(async (event) => { export default defineEventHandler(async (event) => {
// Fetch all documents // Fetch all documents
const docs = await serverQueryContent(event).find() const docs = await serverQueryContent(event).where({ _draft: false }).find()
const feed = new RSS({ const feed = new RSS({
title: 'Juls07', title: 'Juls07',
description: 'Juls07\'s blogs', description: 'Juls07\'s blogs',
@@ -14,7 +14,7 @@ export default defineEventHandler(async (event) => {
feed.item({ feed.item({
title: doc.title, title: doc.title,
description: doc.description, description: doc.description,
image_url: doc.image.src image_url: doc.image.src,
}) })
} }