PHengLEI-docs/docusaurus.config.js

136 lines
3.8 KiB
JavaScript
Raw Normal View History

2023-03-15 10:38:43 +08:00
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
2023-03-15 13:56:22 +08:00
title: 'gitlink',
tagline: 'gitlink帮助中心',
2023-06-29 17:10:49 +08:00
onBrokenLinks: 'ignore',
2023-03-15 10:38:43 +08:00
onBrokenMarkdownLinks: 'warn',
2023-03-15 13:56:22 +08:00
favicon: 'img/icon.ico',
2023-03-15 10:38:43 +08:00
url: 'https://luffyzh.github.io',
baseUrl: '/',
organizationName: 'luffyZh', // Usually your GitHub org/user name.
projectName: 'docusaurus-luffyzh-website', // Usually your repo name.
themeConfig: {
navbar: {
2023-03-15 13:56:22 +08:00
title: '',
2023-03-15 10:38:43 +08:00
logo: {
2023-03-15 13:56:22 +08:00
alt: 'gitlink',
src: 'img/gitlink.png',
2023-03-15 10:38:43 +08:00
},
items: [
{
type: 'doc',
docId: 'intro',
position: 'left',
2023-03-15 13:56:22 +08:00
label: '帮助中心',
2023-03-30 15:33:17 +08:00
}
2023-06-28 18:19:43 +08:00
]
2023-03-15 10:38:43 +08:00
},
footer: {
style: 'dark',
2023-06-28 18:19:43 +08:00
logo:{
2023-06-29 15:52:12 +08:00
src:"img/gitlink.png"
2023-06-28 18:19:43 +08:00
},
2023-03-15 10:38:43 +08:00
links: [
{
2023-06-28 18:19:43 +08:00
title: '社区',
2023-03-15 10:38:43 +08:00
items: [
{
2023-06-28 18:19:43 +08:00
label: '网站首页',
2023-06-29 15:52:12 +08:00
to: 'https://www.gitlink.org.cn',
2023-06-28 18:19:43 +08:00
},
{
label: '关于我们',
2023-06-29 15:52:12 +08:00
to: 'https://www.gitlink.org.cn/aboutus',
2023-06-28 18:19:43 +08:00
},
{
label: '教学实践',
2023-06-29 15:52:12 +08:00
to: 'https://www.gitlink.org.cn/educoder',
2023-06-28 18:19:43 +08:00
},
{
label: '合作伙伴',
2023-06-29 15:52:12 +08:00
to: 'https://forum.trustie.net/forums/5030/detail',
2023-03-15 10:38:43 +08:00
},
],
},
{
2023-06-28 18:19:43 +08:00
title: '支持与服务',
2023-03-15 10:38:43 +08:00
items: [
{
2023-06-28 18:19:43 +08:00
label: 'API文档',
2023-06-29 15:52:12 +08:00
to: 'https://forgeplus.trustie.net/docs/api',
2023-06-28 18:19:43 +08:00
},
{
label: 'Git常用命令',
2023-06-29 15:52:12 +08:00
to: 'https://git-scm.com',
2023-06-28 18:19:43 +08:00
},
{
label: '引擎使用手册',
2023-06-29 15:52:12 +08:00
to: 'https://forum.gitlink.org.cn/forums/7487/detail',
2023-06-28 18:19:43 +08:00
},
{
label: '服务协议',
2023-06-29 15:52:12 +08:00
to: 'https://forum.trustie.net/forums/5029/detail',
2023-03-15 10:38:43 +08:00
},
],
},
{
2023-06-28 18:19:43 +08:00
title: '加入我们',
2023-03-15 10:38:43 +08:00
items: [
{
2023-06-28 18:19:43 +08:00
label: '官网邮箱gitlink@ccf.org.cn',
to:"https://www.gitlink.org.cn"
2023-03-15 10:38:43 +08:00
},
2023-06-29 10:18:19 +08:00
{
label:'QQ群',
to:'https://www.gitlink.org.cn'
},
{
label:'公众号',
to:'https://www.gitlink.org.cn'
}
2023-03-15 10:38:43 +08:00
],
},
],
2023-06-28 18:19:43 +08:00
copyright: `<p>©Copyright ${new Date().getFullYear()} CCF 开源发展委员会</p><p>Powered by Trustie& IntelliDE 京ICP备13000930号</p>`,
2023-03-15 10:38:43 +08:00
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
},
presets: [
[
2023-03-30 15:33:17 +08:00
//此为docusaurus的默认界面风格
2023-03-15 10:38:43 +08:00
'@docusaurus/preset-classic',
{
2023-03-30 15:33:17 +08:00
//此为docs的侧边栏修饰
2023-03-15 10:38:43 +08:00
docs: {
sidebarPath: require.resolve('./sidebars.js'),
2023-03-30 15:33:17 +08:00
//此为网页左下的Edit this page 链接地址
editUrl:'https://www.gitlink.org.cn/Gitlink/gitlink_help_center/tree/master/',
2023-06-29 15:52:12 +08:00
routeBasePath: "/",
2023-03-15 10:38:43 +08:00
},
2023-03-30 15:33:17 +08:00
//修饰的css文件格式
2023-03-15 10:38:43 +08:00
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
2023-06-28 18:19:43 +08:00
plugins: [
2023-06-29 15:52:12 +08:00
[require.resolve('@cmfcmf/docusaurus-search-local'), { // warning: Use '@cmfcmf/docusaurus-search-local' (without the require.resolve) if you use Docusaurus before v2.0.0-alpha.56
indexBlog: true, // whether to index blog pages
indexDocs: true, // whether to index docs pages
indexPages: false, // whether to index static pages
language: "en" // language of your documentation, see next section
}]
2023-06-28 18:19:43 +08:00
],
2023-03-23 11:33:46 +08:00
i18n: {
defaultLocale: 'zh-cn',
2023-03-30 15:33:17 +08:00
locales: ['zh-cn'],
2023-03-23 11:33:46 +08:00
},
2023-03-15 10:38:43 +08:00
};