math-docs/docusaurus.config.js
2023-07-31 11:52:56 +08:00

147 lines
4.1 KiB
JavaScript
Executable File

// @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 = {
title: 'Math Docs',
tagline: '数学,解开未知世界的钥匙。',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://your-docusaurus-test-site.com',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'math-docs', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// 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: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
// editUrl: 'https://gitee.com/tc608/math-docs.git',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
// editUrl: 'https://gitee.com/tc608/math-docs.git',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'Math Docs',
logo: {
alt: 'Maths Docs',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: '中学数学',
},
{ to: '/blog', label: '博客', position: 'left' },
{ to: '/myhome', label: '自定义', position: 'left' },
{
href: 'https://www.1216.top',
label: '社区',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: '知识库',
items: [
{
label: '中学数学',
to: '/docs/intro',
},
],
},
{
title: '社区',
items: [
{
label: 'Redbbs',
href: 'https://www.1216.top',
},
/*{
label: 'Discord',
href: 'https://discordapp.com/invite/docusaurus',
},
{
label: 'Twitter',
href: 'https://twitter.com/docusaurus',
},*/
],
},
{
title: '更多',
items: [
{
label: '博客',
to: '/blog',
},
{
label: 'ZHub',
href: 'https://docs.1216.top',
},
{
label: 'Math-Docs',
href: 'https://math.1216.top',
},
/*{
label: 'GitHub',
href: 'https://github.com/facebook/docusaurus',
},*/
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Math Docs, Inc. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
}
module.exports = config