build zh-CN

This commit is contained in:
caishi 2023-03-30 15:33:17 +08:00
parent 22d41ce974
commit b887d3d23a
2 changed files with 16 additions and 28 deletions

View File

@ -81,6 +81,12 @@
支持常规markdown图片在**static/img/gitlink_logo.png**中添加一个图像.png并在Markdown中显示它 支持常规markdown图片在**static/img/gitlink_logo.png**中添加一个图像.png并在Markdown中显示它
```bash ```bash
![gitlink logo](/img/gitlink_logo.png) ![gitlink logo](/img/gitlink_logo.png)
``` ```
## 前端build成中文
npm run build -- --locale zh-Hans
启动 npm run serve

View File

@ -14,8 +14,8 @@ module.exports = {
projectName: 'docusaurus-luffyzh-website', // Usually your repo name. projectName: 'docusaurus-luffyzh-website', // Usually your repo name.
themeConfig: { themeConfig: {
algolia: { algolia: {
apiKey: '25626fae796133dc1e734c6bcaaeac3c', apiKey: '0f9f28b9ab9efae89810921a351753b5',
indexName: 'docsearch', indexName: 'github',
}, },
navbar: { navbar: {
title: '', title: '',
@ -29,21 +29,7 @@ module.exports = {
docId: 'intro', docId: 'intro',
position: 'left', position: 'left',
label: '帮助中心', label: '帮助中心',
}, }
// {
// position: 'left',
// to: '/blog',
// label: '博客',
// },
// {
// href: 'https://github.com/luffyZh/docusaurus-luffyzh-website',
// label: 'GitHub',
// position: 'right',
// },
// {
// type: 'localeDropdown',
// position: 'right',
// },
], ],
}, },
footer: { footer: {
@ -81,7 +67,7 @@ module.exports = {
], ],
}, },
], ],
copyright: `©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号`, copyright: `<p>©Copyright 2023 CCF 开源发展委员会</p><p>Powered by Trustie& IntelliDE 京ICP备13000930号</p>`,
}, },
prism: { prism: {
theme: lightCodeTheme, theme: lightCodeTheme,
@ -90,20 +76,16 @@ module.exports = {
}, },
presets: [ presets: [
[ [
//此为docusaurus的默认界面风格
'@docusaurus/preset-classic', '@docusaurus/preset-classic',
{ {
//此为docs的侧边栏修饰
docs: { docs: {
sidebarPath: require.resolve('./sidebars.js'), sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo. //此为网页左下的Edit this page 链接地址
editUrl: editUrl:'https://www.gitlink.org.cn/Gitlink/gitlink_help_center/tree/master/',
'https://github.com/facebook/docusaurus/edit/master/website/',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/facebook/docusaurus/edit/master/website/blog/',
}, },
//修饰的css文件格式
theme: { theme: {
customCss: require.resolve('./src/css/custom.css'), customCss: require.resolve('./src/css/custom.css'),
}, },
@ -112,6 +94,6 @@ module.exports = {
], ],
i18n: { i18n: {
defaultLocale: 'zh-cn', defaultLocale: 'zh-cn',
locales: ['en', 'zh-cn'], locales: ['zh-cn'],
}, },
}; };