1- import { defaultTheme } from "vuepress" ;
2- import navbar from "./config/navbar" ;
3- import sidebar from "./config/sidebar" ;
4-
5-
6- // 参考:https://v2.vuepress.vuejs.org/zh/guide/getting-started.html
7- // 主题参考:https://antdocs.js.org/
1+ import pluginsConfig from "./config/plugins.config" ;
2+ import themeConfig from "./config/theme.config" ;
83
94
105export default {
116 title : "凡是过往、皆为序章" ,
127 description : "一本有趣的JavaScript合集" ,
138 base : "/JavaScriptCollection/" ,
14- port : 7100 ,
9+ port : 5000 ,
1510 head : [
1611 [ "link" , { rel : "icon" , href : "/fight_favicon.ico" } ]
1712 ] ,
18- theme : defaultTheme ( {
19- home : '/' ,
20- logo : "/favicon.ico" ,
21- darkMode : false , // 禁用夜色
22- navbar,
23- sidebar,
24- smoothScroll : true ,
25- lastUpdated : true ,
26- lastUpdatedText : "最近更新" ,
27- contributorsText : '贡献者' ,
28- notFound : [ 'not exist' ] , // 自定义404 页面提示语,数组
29- backToHome : '返回首页' , // 返回首页
30- repo : "https://github.com/mmdapl/JavaScriptCollection" ,
31- editLink : false ,
32- // 默认为 "Edit this page"
33- // editLinkText: '帮助我们改善此页面!',
34- displayAllHeaders : true , // 默认值:false 显示所有页面的标题链接
35- search : true ,
36- searchMaxSuggestions : 10 ,
37- } ) ,
38- plugins : [
39- // 全文搜索 参考配置:https://github.com/vuepress/vuepress-next/blob/main/docs/.vuepress/config.ts
40- // ['@vuepress/docsearch',
41- // {
42- // apiKey: '<API_KEY>',
43- // indexName: '<INDEX_NAME>',
44- // locales: {
45- // '/': {
46- // placeholder: '搜索一下',
47- // translations: {
48- // button: {
49- // buttonText: '搜索一下',
50- // buttonAriaLabel: '搜索一下',
51- // },
52- // modal: {
53- // searchBox: {
54- // resetButtonTitle: '清除查询条件',
55- // resetButtonAriaLabel: '清除查询条件',
56- // cancelButtonText: '取消',
57- // cancelButtonAriaLabel: '取消'
58- // },
59- // startScreen: {
60- // recentSearchesTitle: '搜索历史',
61- // noRecentSearchesText: '没有搜索历史',
62- // saveRecentSearchButtonTitle: '保存至搜索历史',
63- // removeRecentSearchButtonTitle: '从搜索历史中移除',
64- // favoriteSearchesTitle: '收藏',
65- // removeFavoriteSearchButtonTitle: '从收藏中移除',
66- // },
67- // errorScreen: {
68- // titleText: '无法获取结果',
69- // helpText: '你可能需要检查你的网络连接',
70- // },
71- // footer: {
72- // selectText: '查询',
73- // selectKeyAriaLabel: 'Enter key',
74- // navigateText: '切换',
75- // navigateUpKeyAriaLabel: 'Arrow up',
76- // navigateDownKeyAriaLabel: 'Arrow down',
77- // closeText: '关闭',
78- // closeKeyAriaLabel: 'Escape key',
79- // searchByText: '技术支持',
80- // },
81- // noResultsScreen: {
82- // noResultsText: '无法找到相关结果',
83- // suggestedQueryText: '你可以尝试查询',
84- // openIssueText: '你认为该查询应该有结果?',
85- // openIssueLinkText: '点击反馈',
86- // },
87- // },
88- // }
89- // }
90- // }
91- // }],
92- // other plugins
93- // [
94- // // 本地全文搜索
95- // '@vuepress/plugin-search',
96- // {
97- // locales: {
98- // '/': {
99- // placeholder: '搜索',
100- // },
101- // '/zh/': {
102- // placeholder: '搜索',
103- // },
104- // },
105- // maxSuggestions: 10 // 显示最大搜索
106- // },
107- // ],
108- ]
13+ theme : themeConfig ,
14+ // 插件配置
15+ plugins :pluginsConfig ,
10916} ;
0 commit comments