@@ -3,20 +3,16 @@ import react from "@astrojs/react";
33import starlight from "@astrojs/starlight" ;
44import remarkMermaid from "@southball/remark-mermaid" ;
55import compress from "astro-compress" ;
6- import icon from "astro-icon" ;
76import metaTags from "astro-meta-tags" ;
87import { defineConfig } from "astro/config" ;
9- import rehypeExternalLinks from "rehype-external-links" ;
108import wikiLinkPlugin from "remark-wiki-link-plus" ;
9+ import starlightSidebarTopics from "starlight-sidebar-topics" ;
10+ import Icons from "unplugin-icons/vite" ;
1111
1212// https://astro.build/config
1313export default defineConfig ( {
1414 integrations : [
1515 metaTags ( ) ,
16- icon ( {
17- include : { "mdi" : [ "launch" ] , "material-symbols" : [ "*" ] } ,
18- iconDir : "src/assets/icons" ,
19- } ) ,
2016 compress ( {
2117 HTML : false ,
2218 CSS : false ,
@@ -40,56 +36,64 @@ export default defineConfig({
4036 logo : {
4137 src : "./src/assets/icons/logo/sym.svg" ,
4238 } ,
43- social : {
44- "github" : "https://github.com/SystemEngineeringTeam/SysLearn" ,
45- "x.com" : "https://x.com/set_official" ,
46- "instagram" : "https://www.instagram.com/ait.sysken" ,
47- } ,
39+ social : [
40+ { icon : "github" , label : "GitHub" , href : " https://github.com/SystemEngineeringTeam/SysLearn" } ,
41+ { icon : "x.com" , label : "X" , href : " https://x.com/set_official" } ,
42+ { icon : "instagram" , label : "Instagram" , href : " https://www.instagram.com/ait.sysken" } ,
43+ ] ,
4844 components : {
49- Sidebar : "src/components/starlight/Sidebar .astro" ,
45+ Footer : "src/components/starlight/Footer .astro" ,
5046 } ,
5147 customCss : [
5248 "@fontsource-variable/inter" ,
5349 "@fontsource-variable/noto-sans-jp" ,
5450 "src/styles/global.css" ,
5551 "src/styles/fonts.css" ,
5652 ] ,
57- sidebar : [
58- {
59- label : "ホーム" ,
60- items : [
61- {
62- label : "はじめに" ,
63- link : "/" ,
64- } ,
65- {
66- label : "困ったときは" ,
67- autogenerate : { directory : "help/" } ,
68- } ,
69- ] ,
70- } ,
71- {
72- label : "C言語" ,
73- items : [
74- {
75- label : "基礎コース" ,
76- autogenerate : { directory : "textbook/c-lang/beginner" } ,
77- } ,
78- ] ,
79- } ,
80- {
81- label : "Web" ,
82- items : [
83- {
84- label : "授業ついていくもんコース" ,
85- autogenerate : { directory : "textbook/web/for-classes" } ,
86- } ,
87- {
88- label : "ハッカソン出れるもんコース" ,
89- autogenerate : { directory : "textbook/web/web/for-hackathons" } ,
90- } ,
91- ] ,
92- } ,
53+ plugins : [
54+ starlightSidebarTopics ( [
55+ {
56+ label : "ホーム" ,
57+ link : "/" ,
58+ icon : "rocket" ,
59+ items : [
60+ {
61+ label : "はじめに" ,
62+ link : "/" ,
63+ } ,
64+ {
65+ label : "困ったときは" ,
66+ autogenerate : { directory : "help/" } ,
67+ } ,
68+ ] ,
69+ } ,
70+ {
71+ label : "C言語" ,
72+ link : "/textbook/c-lang/beginner/01--setup" ,
73+ icon : "document" ,
74+ items : [
75+ {
76+ label : "基礎コース" ,
77+ autogenerate : { directory : "textbook/c-lang/beginner" } ,
78+ } ,
79+ ] ,
80+ } ,
81+ {
82+ label : "Web" ,
83+ link : "/textbook/web" ,
84+ icon : "document" ,
85+ items : [
86+ {
87+ label : "授業ついていくもんコース" ,
88+ autogenerate : { directory : "textbook/web/for-classes" } ,
89+ } ,
90+ {
91+ label : "ハッカソン出れるもんコース" ,
92+ autogenerate : { directory : "textbook/web/for-hackathons" } ,
93+ } ,
94+ ] ,
95+ } ,
96+ ] ) ,
9397 ] ,
9498 } ) ,
9599 react ( ) ,
@@ -114,4 +118,13 @@ export default defineConfig({
114118 ] ,
115119 ] ,
116120 } ,
121+ vite : {
122+ plugins : [
123+ Icons ( {
124+ compiler : "jsx" ,
125+ autoInstall : true ,
126+ jsx : "react" ,
127+ } ) ,
128+ ] ,
129+ } ,
117130} ) ;
0 commit comments