Former-commit-id: df462cbc74e5d5f9f2b6d2a14369bbe007b9d460 [formerly df462cbc74e5d5f9f2b6d2a14369bbe007b9d460 [formerly df462cbc74e5d5f9f2b6d2a14369bbe007b9d460 [formerly df462cbc74e5d5f9f2b6d2a14369bbe007b9d460 [formerly ec8d6757bcca804a0eaa832cce9493457667831b [formerly cf89836cde98f4b69e50e8863ec6d94a9697fb46]]]]] Former-commit-id: 9d49a5ec92447bf4e5c1c5d5e60262d2115a3c03 Former-commit-id: 4ce9106938fb3adad01d038a96aa6a322f1a2f6f Former-commit-id: 5b33f91fabead2d7b12c1e254914f1126e3f852c [formerly 3601b35ab8c1897ba5cdd9e32b4c64585622eb6b] Former-commit-id: 09e9cf395563628e43e1e997b33e3237a95448f3 Former-commit-id: 16df43728b52d9b9736c41ee14f3387c68148146 Former-commit-id: ce4871ce8d3542d8d73f1457f7c183e173f3b222 Former-commit-id: 2b402092ca41a56baba8edcf6d29afc4da46979f Former-commit-id: 9c4eb4f8504f26b40f40cb310cd4daf44e033993
147 lines
3.3 KiB
JavaScript
147 lines
3.3 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('Cookbook', '版本更新'),
|
|
'/zh/others/': sideBarOthers('其它')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function sideBarGuide (title) {
|
|
return [
|
|
{
|
|
title,
|
|
collapsable: false,
|
|
children: [
|
|
'',
|
|
'getting-started',
|
|
'question',
|
|
'plagiarize',
|
|
'change-log'
|
|
]
|
|
}
|
|
]
|
|
}
|
|
|
|
function sideBarPlugins () {
|
|
return [
|
|
'',
|
|
'data-export',
|
|
'data-import',
|
|
'i18n',
|
|
'mock',
|
|
'vuex',
|
|
'util'
|
|
]
|
|
}
|
|
|
|
function sideBarComponents (title) {
|
|
return [
|
|
{
|
|
title,
|
|
collapsable: false,
|
|
children: [
|
|
'',
|
|
'charts',
|
|
'charts-new',
|
|
'container',
|
|
'count-up',
|
|
'highlight',
|
|
'icon-select',
|
|
'icon-svg',
|
|
'icon',
|
|
'markdown'
|
|
]
|
|
}
|
|
]
|
|
}
|
|
|
|
function sideBarArticle (titleCookBook, titleUpdate) {
|
|
return [
|
|
{
|
|
title: titleCookBook,
|
|
collapsable: false,
|
|
children: [
|
|
'cookbook/what-is-cookbook',
|
|
'cookbook/combinable-questionnaire',
|
|
]
|
|
},
|
|
{
|
|
title: titleUpdate,
|
|
collapsable: false,
|
|
children: [
|
|
'update/ice-1.1.2',
|
|
'update/1.1.5',
|
|
'update/1.1.4',
|
|
'update/0.0.0'
|
|
]
|
|
}
|
|
]
|
|
}
|
|
|
|
function sideBarOthers (title) {
|
|
return [
|
|
{
|
|
title,
|
|
collapsable: false,
|
|
children: [
|
|
'',
|
|
'css'
|
|
]
|
|
}
|
|
]
|
|
}
|