Skip to content

Commit ef21555

Browse files
committed
feat: 最上部へ移動を実装
1 parent de8bb26 commit ef21555

File tree

9 files changed

+17675
-3192
lines changed

9 files changed

+17675
-3192
lines changed

astro.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { defineConfig } from "astro/config";
1111
import rehypeExternalLinks from "rehype-external-links";
1212
// @ts-ignore
1313
import wikiLinkPlugin from "remark-wiki-link-plus";
14+
import starlightScrollToTop from "starlight-scroll-to-top";
1415
import starlightSidebarTopics from "starlight-sidebar-topics";
1516
import Icons from "unplugin-icons/vite";
1617

@@ -48,6 +49,7 @@ export default defineConfig({
4849
],
4950
components: {
5051
Footer: "src/components/starlight/Footer.astro",
52+
PageTitle: "src/components/starlight/PageTitle.astro",
5153
},
5254
customCss: [
5355
"@fontsource-variable/inter",
@@ -99,6 +101,11 @@ export default defineConfig({
99101
],
100102
},
101103
]),
104+
starlightScrollToTop({
105+
threshold: 500,
106+
// ref: https://icones.js.org/collection/material-symbols?s=up&variant=Regular&icon=material-symbols:arrow-upward
107+
svgPath: "M11 20V7.825l-5.6 5.6L4 12l8-8l8 8l-1.4 1.425l-5.6-5.6V20z",
108+
}),
102109
],
103110
}),
104111
react(),

bun.lock

Lines changed: 0 additions & 3189 deletions
This file was deleted.

0 commit comments

Comments
 (0)