Skip to content

Commit

Permalink
docs: improvements on blog & changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Feb 24, 2025
1 parent b7929cb commit 24e0efb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/app/pages/blog/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const { copy, copied } = useClipboard({ source: `https://hub.nuxt.com${post.valu
const { data: surround } = await useAsyncData(`blog-${route.params.slug}-surround`, () => {
return queryCollectionItemSurroundings('blog', route.path, {
fields: ['description']
})
}).order('date', 'DESC')
})
const title = post.value.seo?.title || post.value.title
Expand Down
1 change: 1 addition & 0 deletions docs/app/pages/blog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import page from '.blog.yml'
const { data: posts } = await useAsyncData('posts', async () => {
return queryCollection('blog')
.where('extension', '=', 'md')
.select('title', 'date', 'image', 'description', 'path', 'authors', 'category')
.order('date', 'DESC')
.all()
Expand Down
2 changes: 1 addition & 1 deletion docs/app/pages/changelog/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const { copy, copied } = useClipboard({ source: `https://hub.nuxt.com${post.valu
const { data: surround } = await useAsyncData(`changelog-${route.params.slug}-surround`, () => {
return queryCollectionItemSurroundings('changelog', route.path, {
fields: ['description']
})
}).order('date', 'DESC')
})
const title = post.value.seo?.title || post.value.title
Expand Down
1 change: 1 addition & 0 deletions docs/app/pages/changelog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ definePageMeta({
})
const { data: posts } = await useAsyncData('changelogs', async () => {
return queryCollection('changelog')
.where('extension', '=', 'md')
.select('title', 'date', 'image', 'description', 'path', 'authors')
.order('date', 'DESC')
.all()
Expand Down
1 change: 1 addition & 0 deletions docs/server/routes/blog/rss.xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default defineEventHandler(async (event) => {
})

const articles = await queryCollection(event, 'blog')
.where('extension', '=', 'md')
.order('date', 'DESC')
.all()

Expand Down
1 change: 1 addition & 0 deletions docs/server/routes/changelog/rss.xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default defineEventHandler(async (event) => {
})

const changelogItems = await queryCollection(event, 'changelog')
.where('extension', '=', 'md')
.order('date', 'DESC')
.all()

Expand Down

0 comments on commit 24e0efb

Please sign in to comment.