2022-05-20 03:29:08 +00:00
|
|
|
// @ts-check
|
|
|
|
// Note: type annotations allow type checking and IDEs autocompletion
|
|
|
|
|
|
|
|
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
|
|
|
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
|
|
|
|
|
|
|
/** @type {import('@docusaurus/types').Config} */
|
|
|
|
const config = {
|
2022-05-20 08:41:38 +00:00
|
|
|
title: 'Cocos Service Pack',
|
2022-07-05 10:10:58 +00:00
|
|
|
tagline: '提供 Cocos Creator 引擎特性增强、修复与优化的开源非官方服务包',
|
2022-06-01 06:40:10 +00:00
|
|
|
url: 'https://smallmain.github.io',
|
2022-05-20 08:41:38 +00:00
|
|
|
baseUrl: '/cocos-service-pack/',
|
2022-05-20 03:29:08 +00:00
|
|
|
onBrokenLinks: 'throw',
|
|
|
|
onBrokenMarkdownLinks: 'warn',
|
|
|
|
favicon: 'img/favicon.ico',
|
|
|
|
|
|
|
|
// GitHub pages deployment config.
|
|
|
|
// If you aren't using GitHub pages, you don't need these.
|
|
|
|
organizationName: 'smallmain', // Usually your GitHub org/user name.
|
|
|
|
projectName: 'cocos-service-pack', // Usually your repo name.
|
2022-05-20 03:31:56 +00:00
|
|
|
deploymentBranch: 'gh-pages',
|
2022-05-20 03:29:08 +00:00
|
|
|
|
|
|
|
// Even if you don't use internalization, you can use this field to set useful
|
|
|
|
// metadata like html lang. For example, if your site is Chinese, you may want
|
|
|
|
// to replace "en" with "zh-Hans".
|
|
|
|
i18n: {
|
2022-05-20 08:41:38 +00:00
|
|
|
defaultLocale: 'zh',
|
|
|
|
locales: ['zh'],
|
2022-05-20 03:29:08 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
'classic',
|
|
|
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
|
|
|
({
|
|
|
|
docs: {
|
|
|
|
sidebarPath: require.resolve('./sidebars.js'),
|
2022-07-06 07:42:23 +00:00
|
|
|
includeCurrentVersion: false,
|
|
|
|
versions: {
|
|
|
|
"1.0.0": {
|
|
|
|
label: "v1.0.0",
|
|
|
|
}
|
|
|
|
}
|
2022-05-20 03:29:08 +00:00
|
|
|
},
|
|
|
|
blog: {
|
|
|
|
showReadingTime: true,
|
|
|
|
},
|
|
|
|
theme: {
|
|
|
|
customCss: require.resolve('./src/css/custom.css'),
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
themeConfig:
|
|
|
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
|
|
|
({
|
|
|
|
navbar: {
|
2022-05-20 08:41:38 +00:00
|
|
|
title: 'Cocos Service Pack',
|
|
|
|
// style: 'primary',
|
2022-05-20 03:29:08 +00:00
|
|
|
logo: {
|
2022-05-20 08:41:38 +00:00
|
|
|
alt: 'Cocos Service Pack',
|
|
|
|
src: 'img/logo.png',
|
2022-05-20 03:29:08 +00:00
|
|
|
},
|
|
|
|
items: [
|
2022-05-20 08:41:38 +00:00
|
|
|
{
|
|
|
|
to: '/',
|
|
|
|
label: '首页',
|
|
|
|
activeBaseRegex: '/$',
|
|
|
|
position: 'right',
|
|
|
|
},
|
2022-05-20 03:29:08 +00:00
|
|
|
{
|
|
|
|
type: 'doc',
|
|
|
|
docId: 'intro',
|
2022-05-20 08:41:38 +00:00
|
|
|
position: 'right',
|
|
|
|
label: '文档',
|
|
|
|
},
|
2022-06-09 13:29:25 +00:00
|
|
|
{
|
2022-07-07 13:17:52 +00:00
|
|
|
href: 'https://smallmain.gitee.io/cocos-service-pack/demo/v1.0.0/web-desktop/index.html',
|
2022-06-09 13:29:25 +00:00
|
|
|
label: '演示',
|
|
|
|
position: 'right',
|
|
|
|
},
|
2022-07-06 07:42:23 +00:00
|
|
|
{
|
|
|
|
type: 'docsVersionDropdown',
|
|
|
|
position: 'right',
|
|
|
|
// dropdownItemsAfter: [{ to: '/versions', label: 'All versions' }],
|
|
|
|
dropdownActiveClassDisabled: true,
|
|
|
|
},
|
2022-05-20 08:41:38 +00:00
|
|
|
// { to: '/blog', label: 'Blog', position: 'left' },
|
2022-05-20 03:29:08 +00:00
|
|
|
{
|
2022-05-20 08:41:38 +00:00
|
|
|
href: 'https://github.com/smallmain/cocos-service-pack',
|
2022-06-01 06:40:10 +00:00
|
|
|
label: '加星鼓励',
|
2022-05-20 03:29:08 +00:00
|
|
|
position: 'right',
|
2022-06-01 06:40:10 +00:00
|
|
|
className: 'header-github-link',
|
2022-05-20 03:29:08 +00:00
|
|
|
},
|
2022-05-20 08:41:38 +00:00
|
|
|
{
|
|
|
|
type: 'search',
|
|
|
|
position: 'right',
|
|
|
|
},
|
2022-05-20 03:29:08 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
prism: {
|
|
|
|
theme: lightCodeTheme,
|
|
|
|
darkTheme: darkCodeTheme,
|
|
|
|
},
|
|
|
|
}),
|
2022-05-20 08:41:38 +00:00
|
|
|
themes: [
|
|
|
|
[
|
|
|
|
require.resolve("@easyops-cn/docusaurus-search-local"),
|
|
|
|
{
|
|
|
|
hashed: true,
|
|
|
|
indexPages: true,
|
|
|
|
language: ['en', 'zh'],
|
|
|
|
removeDefaultStemmer: true,
|
|
|
|
searchResultLimits: 10,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
2022-05-20 03:29:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|