change to single language.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { hopeTheme } from "vuepress-theme-hope";
|
||||
|
||||
import { enNavbar, zhNavbar } from "./navbar/index.js";
|
||||
import { enSidebar, zhSidebar } from "./sidebar/index.js";
|
||||
import navbar from "./navbar.js";
|
||||
import sidebar from "./sidebar.js";
|
||||
|
||||
export default hopeTheme({
|
||||
hostname: "https://vuepress-theme-hope-docs-demo.netlify.app",
|
||||
@@ -17,58 +17,35 @@ export default hopeTheme({
|
||||
|
||||
docsDir: "src",
|
||||
|
||||
locales: {
|
||||
"/": {
|
||||
// navbar
|
||||
navbar: enNavbar,
|
||||
// 导航栏
|
||||
navbar,
|
||||
|
||||
// sidebar
|
||||
sidebar: enSidebar,
|
||||
// 侧边栏
|
||||
sidebar,
|
||||
|
||||
footer: "Default footer",
|
||||
|
||||
displayFooter: true,
|
||||
|
||||
metaLocales: {
|
||||
editLink: "Edit this page on GitHub",
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Chinese locale config
|
||||
*/
|
||||
"/zh/": {
|
||||
// navbar
|
||||
navbar: zhNavbar,
|
||||
|
||||
// sidebar
|
||||
sidebar: zhSidebar,
|
||||
|
||||
footer: "默认页脚",
|
||||
|
||||
displayFooter: true,
|
||||
|
||||
// page meta
|
||||
metaLocales: {
|
||||
editLink: "在 GitHub 上编辑此页",
|
||||
},
|
||||
},
|
||||
},
|
||||
// 页脚
|
||||
footer: "默认页脚",
|
||||
displayFooter: true,
|
||||
|
||||
// 加密配置
|
||||
encrypt: {
|
||||
config: {
|
||||
"/demo/encrypt.html": {
|
||||
hint: "Password: 1234",
|
||||
password: "1234",
|
||||
},
|
||||
"/zh/demo/encrypt.html": {
|
||||
hint: "Password: 1234",
|
||||
password: "1234",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// These features are enabled for demo, only preserve features you need here
|
||||
// 多语言配置
|
||||
metaLocales: {
|
||||
editLink: "在 GitHub 上编辑此页",
|
||||
},
|
||||
|
||||
// 如果想要实时查看任何改变,启用它。注: 这对更新性能有很大负面影响
|
||||
// hotReload: true,
|
||||
|
||||
// 此处开启了很多功能用于演示,你应仅保留用到的功能。
|
||||
markdown: {
|
||||
align: true,
|
||||
attrs: true,
|
||||
@@ -102,45 +79,47 @@ export default hopeTheme({
|
||||
tasklist: true,
|
||||
vPre: true,
|
||||
|
||||
// uncomment these if you need TeX support
|
||||
// 取消注释它们如果你需要 TeX 支持
|
||||
// math: {
|
||||
// // install katex before enabling it
|
||||
// // 启用前安装 katex
|
||||
// type: "katex",
|
||||
// // or install mathjax-full before enabling it
|
||||
// // 或者安装 mathjax-full
|
||||
// type: "mathjax",
|
||||
// },
|
||||
|
||||
// install chart.js before enabling it
|
||||
// 如果你需要幻灯片,安装 @vuepress/plugin-revealjs 并取消下方注释
|
||||
// revealjs: {
|
||||
// plugins: ["highlight", "math", "search", "notes", "zoom"],
|
||||
// },
|
||||
|
||||
// 在启用之前安装 chart.js
|
||||
// chartjs: true,
|
||||
|
||||
// install echarts before enabling it
|
||||
// insert component easily
|
||||
|
||||
// 在启用之前安装 echarts
|
||||
// echarts: true,
|
||||
|
||||
// install flowchart.ts before enabling it
|
||||
// 在启用之前安装 flowchart.ts
|
||||
// flowchart: true,
|
||||
|
||||
// install mermaid before enabling it
|
||||
// 在启用之前安装 mermaid
|
||||
// mermaid: true,
|
||||
|
||||
// playground: {
|
||||
// presets: ["ts", "vue"],
|
||||
// },
|
||||
|
||||
// install @vue/repl before enabling it
|
||||
// 在启用之前安装 @vue/repl
|
||||
// vuePlayground: true,
|
||||
|
||||
// install sandpack-vue3 before enabling it
|
||||
// 在启用之前安装 sandpack-vue3
|
||||
// sandpack: true,
|
||||
|
||||
// install @vuepress/plugin-revealjs and uncomment these if you need slides
|
||||
// revealjs: {
|
||||
// plugins: ["highlight", "math", "search", "notes", "zoom"],
|
||||
// },
|
||||
},
|
||||
|
||||
// 在这里配置主题提供的插件
|
||||
plugins: {
|
||||
// Note: This is for testing ONLY!
|
||||
// You MUST generate and use your own comment service in production.
|
||||
// 注意: 仅用于测试! 你必须自行生成并在生产环境中使用自己的评论服务
|
||||
comment: {
|
||||
provider: "Giscus",
|
||||
repo: "vuepress-theme-hope/giscus-discussions",
|
||||
@@ -157,7 +136,7 @@ export default hopeTheme({
|
||||
prefix: "fa6-solid:",
|
||||
},
|
||||
|
||||
// Install @vuepress/plugin-pwa and uncomment these if you want a PWA
|
||||
// 如果你需要 PWA。安装 @vuepress/plugin-pwa 并取消下方注释
|
||||
// pwa: {
|
||||
// favicon: "/favicon.ico",
|
||||
// cacheHTML: true,
|
||||
|
||||
Reference in New Issue
Block a user