This repository was archived by the owner on May 1, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -56,9 +56,19 @@ const breadcrumbs = computed(() => {
56
56
57
57
const ui = useUiState ()
58
58
59
- const sourceUrl = computed (() => page .value ?._file
60
- ? ` https://github.com/nuxt/learn.nuxt.com/edit/main/content/${page .value ._file } `
61
- : undefined )
59
+ const sourceUrl = computed (() =>
60
+ page .value ?._file
61
+ ? ` https://github.com/nuxt/learn.nuxt.com/edit/main/content/${page .value ._file } `
62
+ : undefined ,
63
+ )
64
+
65
+ const docsEl = ref <HTMLElement | null >(null )
66
+ const router = useRouter ()
67
+ router .beforeEach (() => {
68
+ docsEl .value ?.scrollTo ({
69
+ top: 0 ,
70
+ })
71
+ })
62
72
</script >
63
73
64
74
<template >
@@ -82,7 +92,7 @@ const sourceUrl = computed(() => page.value?._file
82
92
/>
83
93
</div >
84
94
<div relative h-full of-hidden >
85
- <article class =" max-w-none prose" h-full of-auto p6 >
95
+ <article ref = " docsEl " class =" max-w-none prose" h-full of-auto p6 >
86
96
<ContentDoc />
87
97
<div mt8 py2 grid =" ~ cols-[1fr_1fr] gap-4" >
88
98
<div >
Original file line number Diff line number Diff line change @@ -5,5 +5,6 @@ export const meta: GuideMeta = {
5
5
features : {
6
6
terminal : false ,
7
7
fileTree : false ,
8
+ navigation : false ,
8
9
} ,
9
10
}
Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ export async function reloadLanguageTools(ctx: PlaygroundMonacoContext) {
86
86
const tsconfigRaw = await ctx . webcontainer ?. fs
87
87
. readFile ( '.nuxt/tsconfig.json' , 'utf-8' )
88
88
. catch ( ( ) => undefined )
89
+
90
+ if ( ! tsconfigRaw )
91
+ return
92
+
89
93
const tsconfig = tsconfigRaw
90
94
? JSON . parse ( stripJsonComments ( tsconfigRaw , { trailingCommas : true } ) )
91
95
: { }
You can’t perform that action at this time.
0 commit comments