Skip to content

Commit 799156c

Browse files
docs: add manual ContentSurround for the introduction step (#456)
1 parent ab52c85 commit 799156c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/app/pages/[...slug].vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ const surroundData = useAsyncData(`docs-${route.path}-surround`, () => queryColl
2121
await Promise.all([docData, surroundData])
2222
const page = docData.data
2323
const surround = surroundData.data
24+
const surroundIntroduction = [
25+
undefined,
26+
{
27+
description: 'Learn how to create a Nuxt Scripts project or add it to your current Nuxt project.',
28+
path: '/docs/getting-started/installation',
29+
stem: 'docs/1.getting-started/2.installation',
30+
title: 'Installation',
31+
_path: '/docs/getting-started/installation',
32+
},
33+
]
2434
2535
if (!page.value)
2636
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
@@ -43,9 +53,10 @@ defineOgImageComponent('Docs', {
4353
<UPageBody prose class="dark:text-gray-300 dark:prose-pre:!bg-gray-800/60">
4454
<ContentRenderer v-if="page.body" :value="page" />
4555

46-
<hr v-if="surround?.length">
56+
<hr v-if="surround?.length || page.path === '/docs/getting-started'">
4757

4858
<UContentSurround :surround="surround" />
59+
<UContentSurround v-if="page.path === '/docs/getting-started'" :surround="surroundIntroduction" />
4960
</UPageBody>
5061

5162
<!-- <template v-if="page.toc !== false" #right> -->

0 commit comments

Comments
 (0)