@@ -3,6 +3,7 @@ import { defineConfig } from "vitepress";
33import { withMermaid } from "vitepress-plugin-mermaid" ;
44
55const docsBase = "/learn-harness-engineering/" ;
6+ const starLogo = 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23F5C542" stroke="%23D49B00" stroke-width="1.2" d="M12 2.8l2.68 5.43 5.99.87-4.34 4.23 1.02 5.97L12 16.64 6.65 19.3l1.02-5.97-4.34-4.23 5.99-.87L12 2.8Z"/></svg>' ;
67
78const zhLectureItems = [
89 { text : "欢迎" , link : "/zh/" } ,
@@ -84,10 +85,10 @@ export default withMermaid(
8485 srcExclude : [ "temp/**" ] ,
8586 ignoreDeadLinks : true ,
8687 head : [
87- [ 'link' , { rel : 'icon' , type : 'image/svg+xml' , href : 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect width="24" height="24" rx="4" fill="%23FFFFFF" /><path d="M12 4L13.4 8.6L18 10L13.4 11.4L12 16L10.6 11.4L6 10L10.6 8.6L12 4Z" fill="%23D95C41"/></svg>' } ]
88+ [ 'link' , { rel : 'icon' , type : 'image/svg+xml' , href : starLogo } ]
8889 ] ,
8990 themeConfig : {
90- logo : 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect width="24" height="24" rx="4" fill="%231A1A1A" /><path d="M12 4L13.4 8.6L18 10L13.4 11.4L12 16L10.6 11.4L6 10L10.6 8.6L12 4Z" fill="%23D95C41"/></svg>' ,
91+ logo : starLogo ,
9192 search : {
9293 provider : "local"
9394 } ,
@@ -113,6 +114,12 @@ export default withMermaid(
113114 root : {
114115 label : "English" ,
115116 lang : "en" ,
117+ link : "/en/"
118+ } ,
119+ en : {
120+ label : "English" ,
121+ lang : "en" ,
122+ link : "/en/" ,
116123 themeConfig : {
117124 nav : [
118125 { text : "Lectures" , link : enLectureItems [ 1 ] . link , activeMatch : '^/en/(lectures/.*)?$' } ,
@@ -140,32 +147,27 @@ export default withMermaid(
140147 { text : "Try Harness ↗" , link : "https://github.com/walkinglabs/learn-harness-engineering/blob/main/docs/zh/resources/templates/index.md" , target : "_blank" , rel : "noopener noreferrer" }
141148 ] ,
142149 sidebar : {
143- '/zh/projects/' : [ { text : "项目" , items : zhProjectItems } ] ,
144- '/zh/resources/' : [ { text : "资料库" , items : zhResourceItems } ] ,
145- '/zh/' : [ { text : "讲义" , items : zhLectureItems } ]
146- } ,
147- outline : {
148- level : [ 2 , 3 ]
149- } ,
150- docFooter : {
151- prev : "上一篇" ,
152- next : "下一篇"
153- } ,
154- lastUpdated : {
155- text : "最后更新于"
156- } ,
157- returnToTopLabel : "回到顶部" ,
158- sidebarMenuLabel : "菜单" ,
159- darkModeSwitchLabel : "主题" ,
160- lightModeSwitchTitle : "切换到浅色模式" ,
161- darkModeSwitchTitle : "切换到深色模式" ,
162- socialLinks : [ { icon : "github" , link : "https://github.com/walkinglabs/learn-harness-engineering" } ]
150+ '/zh/projects/' : [ { text : "项目" , items : zhProjectItems } ] ,
151+ '/zh/resources/' : [ { text : "资料库" , items : zhResourceItems } ] ,
152+ '/zh/' : [ { text : "讲义" , items : zhLectureItems } ]
153+ } ,
154+ outline : {
155+ level : [ 2 , 3 ]
156+ } ,
157+ docFooter : {
158+ prev : "上一篇" ,
159+ next : "下一篇"
160+ } ,
161+ lastUpdated : {
162+ text : "最后更新于"
163+ } ,
164+ returnToTopLabel : "回到顶部" ,
165+ sidebarMenuLabel : "菜单" ,
166+ darkModeSwitchLabel : "主题" ,
167+ lightModeSwitchTitle : "切换到浅色模式" ,
168+ darkModeSwitchTitle : "切换到深色模式" ,
169+ socialLinks : [ { icon : "github" , link : "https://github.com/walkinglabs/learn-harness-engineering" } ]
170+ }
163171 }
164- } ,
165- en : {
166- label : "English" ,
167- lang : "en" ,
168- link : "/en/"
169172 }
170- }
171173} ) ) ;
0 commit comments