We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3ad7316 + ae09e3f commit a9ab571Copy full SHA for a9ab571
docs/.vuepress/config.ts
@@ -9,6 +9,11 @@ export default defineUserConfig({
9
headers: {
10
level: [2, 3, 4, 5],
11
},
12
+ anchor: {
13
+ permalink: true,
14
+ permalinkBefore: true,
15
+ permalinkSymbol: '#',
16
+ },
17
18
plugins,
19
bundler: viteBundler({
@@ -19,4 +24,14 @@ export default defineUserConfig({
24
20
25
}),
21
26
head: headFunctions,
27
+ scrollBehavior(to, from, savedPosition) {
28
+ if (to.hash) {
29
+ return {
30
+ el: to.hash,
31
+ behavior: 'smooth',
32
+ top: 80, // Adjust based on your header height
33
+ }
34
35
+ return savedPosition || { top: 0 }
36
22
37
});
0 commit comments