2021-01-19 21:13:13 +08:00
|
|
|
import type { UserConfig } from '@vuepress/cli'
|
|
|
|
import type { DefaultThemeOptions } from '@vuepress/theme-default'
|
|
|
|
import { navbar, sidebar } from './configs'
|
|
|
|
|
|
|
|
const config: UserConfig<DefaultThemeOptions> = {
|
2021-03-06 15:22:09 +08:00
|
|
|
base: '/fesjs/',
|
2021-01-19 21:13:13 +08:00
|
|
|
|
|
|
|
evergreen: process.env.NODE_ENV !== 'production',
|
|
|
|
|
2021-03-06 15:22:09 +08:00
|
|
|
head: [['link', { rel: 'manifest', href: '/fesjs/manifest.webmanifest' }], ['link', { rel: 'icon', href: `/fesjs/logo.png` }]],
|
2021-01-19 21:13:13 +08:00
|
|
|
|
|
|
|
// site-level locales config
|
|
|
|
locales: {
|
|
|
|
'/': {
|
|
|
|
lang: 'en-US',
|
2021-01-20 11:36:57 +08:00
|
|
|
title: 'Fes.js',
|
|
|
|
description: 'A Good Front-end Application Solution',
|
2021-01-19 21:13:13 +08:00
|
|
|
},
|
|
|
|
'/zh/': {
|
|
|
|
lang: 'zh-CN',
|
2021-01-20 11:36:57 +08:00
|
|
|
title: 'Fes.js',
|
2021-03-02 15:27:21 +08:00
|
|
|
description: '一个好用的前端应用解决方案',
|
2021-01-19 21:13:13 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
themeConfig: {
|
2021-01-22 17:43:38 +08:00
|
|
|
logo: '/logo.png',
|
2021-01-19 21:13:13 +08:00
|
|
|
|
2021-01-20 11:36:57 +08:00
|
|
|
repo: 'WeBankFinTech/fes.js',
|
2021-01-19 21:13:13 +08:00
|
|
|
|
|
|
|
docsDir: 'docs',
|
|
|
|
|
2021-03-06 16:09:22 +08:00
|
|
|
docsBranch: 'vue3',
|
|
|
|
|
2021-01-19 21:13:13 +08:00
|
|
|
// theme-level locales config
|
|
|
|
locales: {
|
|
|
|
/**
|
|
|
|
* English locale config
|
|
|
|
*
|
|
|
|
* As the default locale of @vuepress/theme-default is English,
|
|
|
|
* we don't need to set all of the locale fields
|
|
|
|
*/
|
|
|
|
'/': {
|
|
|
|
// navbar
|
|
|
|
navbar: navbar.en,
|
|
|
|
|
|
|
|
// sidebar
|
|
|
|
sidebar: sidebar.en,
|
|
|
|
|
|
|
|
// page meta
|
|
|
|
editLinkText: 'Edit this page on GitHub',
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Chinese locale config
|
|
|
|
*/
|
|
|
|
'/zh/': {
|
|
|
|
// navbar
|
|
|
|
navbar: navbar.zh,
|
|
|
|
selectLanguageName: '简体中文',
|
|
|
|
selectLanguageText: '选择语言',
|
|
|
|
selectLanguageAriaLabel: '选择语言',
|
|
|
|
|
|
|
|
// sidebar
|
|
|
|
sidebar: sidebar.zh,
|
|
|
|
|
|
|
|
// page meta
|
|
|
|
editLinkText: '在 GitHub 上编辑此页',
|
|
|
|
lastUpdatedText: '上次更新',
|
|
|
|
contributorsText: '贡献者',
|
|
|
|
|
|
|
|
// custom containers
|
|
|
|
tip: '提示',
|
|
|
|
warning: '注意',
|
|
|
|
danger: '警告',
|
|
|
|
|
|
|
|
// 404 page
|
|
|
|
notFound: [
|
|
|
|
'这里什么都没有',
|
|
|
|
'我们怎么到这来了?',
|
|
|
|
'这是一个 404 页面',
|
|
|
|
'看起来我们进入了错误的链接',
|
|
|
|
],
|
|
|
|
backToHome: '返回首页',
|
|
|
|
|
|
|
|
// other
|
|
|
|
openInNewWindow: '在新窗口打开',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
plugins: [
|
2021-03-02 11:21:42 +08:00
|
|
|
// [
|
|
|
|
// '@vuepress/plugin-docsearch',
|
|
|
|
// {
|
|
|
|
// apiKey: '<API_KEY>',
|
|
|
|
// indexName: '<INDEX_NAME>',
|
|
|
|
// locales: {
|
|
|
|
// '/': {
|
|
|
|
// placeholder: 'Search Documentation',
|
|
|
|
// },
|
|
|
|
// '/zh/': {
|
|
|
|
// placeholder: '搜索文档',
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
// ],
|
2021-01-19 21:13:13 +08:00
|
|
|
['@vuepress/plugin-pwa'],
|
|
|
|
[
|
|
|
|
'@vuepress/plugin-pwa-popup',
|
|
|
|
{
|
|
|
|
locales: {
|
2021-03-02 11:21:42 +08:00
|
|
|
'/': {
|
|
|
|
message: 'New content is available.',
|
|
|
|
buttonText: 'Refresh',
|
|
|
|
},
|
2021-01-19 21:13:13 +08:00
|
|
|
'/zh/': {
|
|
|
|
message: '发现新内容可用',
|
|
|
|
buttonText: '刷新',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
export = config
|