feat: add tag page

This commit is contained in:
kmacoders
2021-07-08 14:30:45 +07:00
parent b5706dfb42
commit b0f2e5dbb2
3 changed files with 7 additions and 12 deletions

View File

@@ -17,13 +17,13 @@ import getSiteMeta from '@/utils/getSiteMeta'
.fetch()
const [blogDetail] = findedBlog
const [prev, next] = await $content('blog')
const [prev, next] = await $content('blog', { deep: true })
.only(['title', 'slug', 'published'])
.sortBy('published', 'desc')
.surround(params.slug)
.fetch()
const allBlogs = await $content('blog')
const allBlogs = await $content('blog', { deep: true })
.only(['title', 'description', 'image', 'slug', 'published', 'tags'])
.sortBy('published', 'desc')
.fetch()