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-06-01 06:40:10 +00:00
|
|
|
tagline: '给 Cocos Creator 加点料',
|
|
|
|
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'),
|
|
|
|
},
|
|
|
|
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
|
|
|
{
|
|
|
|
href: 'TODO',
|
|
|
|
label: '演示',
|
|
|
|
position: 'right',
|
|
|
|
},
|
2022-05-20 08:41:38 +00:00
|
|
|
{
|
|
|
|
type: 'docsVersionDropdown',
|
|
|
|
position: 'right',
|
|
|
|
dropdownItemsAfter: [{ to: '/versions', label: 'All versions' }],
|
|
|
|
dropdownActiveClassDisabled: true,
|
2022-05-20 03:29:08 +00:00
|
|
|
},
|
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
|
|
|
],
|
|
|
|
},
|
|
|
|
footer: {
|
|
|
|
style: 'dark',
|
|
|
|
links: [
|
2022-05-20 08:41:38 +00:00
|
|
|
// {
|
|
|
|
// title: 'Docs',
|
|
|
|
// items: [
|
|
|
|
// {
|
|
|
|
// label: 'Tutorial',
|
|
|
|
// to: '/docs/intro',
|
|
|
|
// },
|
|
|
|
// ],
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// title: 'Community',
|
|
|
|
// items: [
|
|
|
|
// {
|
|
|
|
// label: 'Stack Overflow',
|
|
|
|
// href: 'https://stackoverflow.com/questions/tagged/docusaurus',
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: 'Discord',
|
|
|
|
// href: 'https://discordapp.com/invite/docusaurus',
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: 'Twitter',
|
|
|
|
// href: 'https://twitter.com/docusaurus',
|
|
|
|
// },
|
|
|
|
// ],
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// title: 'More',
|
|
|
|
// items: [
|
|
|
|
// // {
|
|
|
|
// // label: 'Blog',
|
|
|
|
// // to: '/blog',
|
|
|
|
// // },
|
|
|
|
// {
|
|
|
|
// label: 'GitHub',
|
|
|
|
// href: 'https://github.com/facebook/docusaurus',
|
|
|
|
// },
|
|
|
|
// ],
|
|
|
|
// },
|
2022-05-20 03:29:08 +00:00
|
|
|
],
|
2022-05-20 08:41:38 +00:00
|
|
|
copyright: `Copyright © ${new Date().getFullYear()} Cocos Service Pack.`,
|
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;
|