Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Oct 11, 2023
1 parent 66306b2 commit 22f5260
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/newsletter/NewsletterForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defineProps({
},
description: {
type: String,
default: 'Stay updated on new releases and features, guides, and community updates'
default: 'Stay updated on new releases and features, guides, and community updates.'
}
})
Expand Down
1 change: 0 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export default defineNuxtConfig({
'/docs/getting-started': { redirect: '/docs/getting-started/introduction', prerender: false },
'/docs/guide/concepts': { redirect: '/docs/guide/concepts/auto-imports', prerender: false },
'/docs/guide': { redirect: '/docs/guide/concepts/auto-imports', prerender: false },
'/docs/api': { redirect: '/docs/api/composables/use-app-config', prerender: false },
'/docs/examples': { redirect: '/docs/examples/hello-world', prerender: false },
'/docs/community': { redirect: '/docs/community/nuxt-community', prerender: false },
'/enterprise': { redirect: '/enterprise/support', prerender: false }
Expand Down
16 changes: 10 additions & 6 deletions pages/docs/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ const route = useRoute()
const { data: page } = await useAsyncData(route.path, () => queryContent(route.path).findOne())
if (!page.value) {
throw createError({ statusCode: 404, statusMessage: 'Page not found' })
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
}
const { data: surround } = await useAsyncData(`${route.path}-surround`, () => queryContent('/docs')
.where({ _extension: 'md', navigation: { $ne: false } })
.without(['body', 'excerpt'])
.findSurround(withoutTrailingSlash(route.path))
)
const { data: surround } = await useAsyncData(`${route.path}-surround`, () => {
if (page.value.surround === false) {
return []
}
return queryContent('/docs')
.where({ _extension: 'md', navigation: { $ne: false } })
.without(['body', 'excerpt'])
.findSurround(withoutTrailingSlash(route.path))
})
const breadcrumb = computed(() => mapContentNavigation(findPageBreadcrumb(navigation.value, page.value)).slice(1))
Expand Down

0 comments on commit 22f5260

Please sign in to comment.