Files
mes-ui-d2/docs/.vuepress/config.js
liyang 971bc57e23 文档修改
Former-commit-id: 37018e244707b30806fb173d80e588a4df6713a2 [formerly 0b3304b39a5983d28afe56795aada2550be0b92c] [formerly 37018e244707b30806fb173d80e588a4df6713a2 [formerly 0b3304b39a5983d28afe56795aada2550be0b92c] [formerly 37018e244707b30806fb173d80e588a4df6713a2 [formerly 0b3304b39a5983d28afe56795aada2550be0b92c] [formerly 0b3304b39a5983d28afe56795aada2550be0b92c [formerly ad2eaa2dae3b77ad1e8d36c53a1a7b780da551ff [formerly 7b2896662874ea67b3f5a911c8dbcbed92bcfc76]]]]]
Former-commit-id: 43bee05fb709711e05ac453ff42056dd6f920be5
Former-commit-id: 43c42c3a74ac62d7e18d8ceb06cf809fce6ee33a
Former-commit-id: 1e0fafec480707c04bec7cd74d84da367aaa1f1b [formerly 7de3e97bfe3b60e836ac968e3d677f46bc697e09]
Former-commit-id: 19235e48028ec36be623234db1e6ba2eb79175ab
Former-commit-id: ced4b0e389b67e88aedacf102a711ca0d67cbc3b
Former-commit-id: 7a40cca1fe272be9675f1090ee4b665e087f81db
Former-commit-id: b4d95a0497bf2ae7c4271991b03aabbf1ada2656
Former-commit-id: ddcd0e7a15f7c71a066d22be51f0276a1e9525ec
2018-07-12 21:04:13 +08:00

135 lines
3.0 KiB
JavaScript

module.exports = {
locales: {
'/': {
lang: 'en-US',
title: 'D2 Admin',
description: 'Elegant management system front-end integration'
},
'/zh/': {
lang: 'zh-CN',
title: 'D2 Admin',
description: '优雅的管理系统前端集成方案'
}
},
head: [
['link', { rel: 'icon', href: `/logo@2x.png` }],
['script', {}, 'var _hmt = _hmt || [];(function() {var hm = document.createElement("script");hm.src = "https://hm.baidu.com/hm.js?be9d34853430c136b5d62c3081d556a5";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm, s);})();']
],
themeConfig: {
// 项目仓库地址
repo: 'https://github.com/d2-projects/d2-admin',
// 自定义仓库链接文字
repoLabel: '查看源码',
// 文档不是放在仓库的根目录下
docsDir: 'docs',
// 默认是 false, 设置为 true 来启用
editLinks: true,
// 多国语言
locales: {
'/': {
selectText: 'Languages',
label: 'English',
editLinkText: 'Edit this page on GitHub',
lastUpdated: 'Last update',
nav: [
{ text: 'preview', link: 'https://fairyever.gitee.io/d2-admin-preview/#/index' }
]
},
'/zh/': {
selectText: '选择语言',
label: '简体中文',
editLinkText: '在 GitHub 上编辑此页',
lastUpdated: '最后更新',
nav: [
{ text: '指南', link: '/zh/guide/' },
{ text: '插件', link: '/zh/plugins/' },
{ text: '组件', link: '/zh/components/' },
{ text: '文章', link: '/zh/article/' },
{ text: '其它', link: '/zh/others/' },
{ text: '预览', link: 'https://fairyever.gitee.io/d2-admin-preview/#/index' }
],
sidebar: {
'/zh/guide/': sideBarGuide('指南'),
'/zh/plugins/': sideBarPlugins('插件'),
'/zh/components/': sideBarComponents('组件'),
'/zh/article/': sideBarArticle('版本更新'),
'/zh/others/': sideBarOthers('其它')
}
}
}
}
}
function sideBarGuide (title) {
return [
{
title,
collapsable: false,
children: [
'',
'question',
'pr',
'change-log'
]
}
]
}
function sideBarPlugins () {
return [
'',
'data-export',
'data-import',
'i18n',
'mock'
]
}
function sideBarComponents (title) {
return [
{
title,
collapsable: false,
children: [
'',
'charts',
'charts-new',
'container',
'count-up',
'highlight',
'icon-select',
'icon-svg',
'icon',
'markdown'
]
}
]
}
function sideBarArticle (titleUpdate) {
return [
{
title: titleUpdate,
collapsable: false,
children: [
'',
'update/1.1.4',
'update/0.0.0'
]
}
]
}
function sideBarOthers (title) {
return [
{
title,
collapsable: false,
children: [
'',
'css'
]
}
]
}