add idea overflow blog

This commit is contained in:
Zoe
2024-11-13 00:08:50 -06:00
parent 9b19daca33
commit 62de714bce
13 changed files with 62 additions and 18 deletions

View File

@@ -47,10 +47,9 @@ if (!doc.value) {
throw createError({ statusCode: 404, statusMessage: 'Article not found', fatal: true })
}
const { data: surround } = await useAsyncData(`${route.path}-surround`, () => queryContent('/blog')
.where({ _extension: 'md' })
.only(['title', 'description', '_path'])
.sort({ date: 1 })
const { data: surround } = await useAsyncData(`${route.path}-surround`, () => queryContent()
.only(['title', 'description', '_path', 'date'])
.sort({ date: -1 })
.where({ _draft: false })
.findSurround(withoutTrailingSlash(route.path))
)