120 lines
3.5 KiB
JavaScript
120 lines
3.5 KiB
JavaScript
// @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: 'ZHub',
|
||
tagline: '轻量级消息中间件',
|
||
favicon: 'img/favicon.ico',
|
||
|
||
// Set the production url of your site here
|
||
url: 'https://zhub.dev',
|
||
// Set the /<baseUrl>/ pathname under which your site is served
|
||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||
baseUrl: '/',
|
||
customFields: {
|
||
// 添加自定义输出目录
|
||
outDir: 'dist',
|
||
},
|
||
|
||
// 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: 'docusaurus', // 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/doc-zhub/main',
|
||
},
|
||
|
||
blog: {
|
||
showReadingTime: true,
|
||
// Please change this to your repo.
|
||
// Remove this to remove the "edit this page" links.
|
||
// editUrl: 'https://gitee.com/tc608/doc-zhub/main',
|
||
},
|
||
|
||
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: 'ZHub',
|
||
logo: {
|
||
alt: 'My Site Logo',
|
||
src: 'img/logo.svg',
|
||
},
|
||
items: [
|
||
{type: 'docSidebar', sidebarId: 'tutorialSidebar', position: 'left', label: '文档',},
|
||
{href: 'https://zhub.dev/release/latest', label: '下载', position: 'left',},
|
||
{ to: '/blog', label: 'Blog', position: 'left' },
|
||
{href: 'https://gitee.com/tc608/zhub', label: 'Gitee', position: 'right',},
|
||
],
|
||
},
|
||
|
||
footer: {
|
||
style: 'dark',
|
||
links: [
|
||
{
|
||
title: '文档',
|
||
items: [
|
||
{label: '下载', href: 'https://zhub.dev/release/latest/',},
|
||
{label: '快速开始', to: '/docs/intro',},
|
||
],
|
||
},
|
||
{
|
||
title: '社区',
|
||
items: [
|
||
{label: 'Gitee', href: 'https://gitee.com/tc608',},
|
||
{label: '微信:zhub_dev', to: '/'},
|
||
],
|
||
},
|
||
{
|
||
title: '更多',
|
||
items: [
|
||
{label: '博客', to: '/blog',},
|
||
{label: '反馈', href: 'https://gitee.com/tc608/zhub/issues?state=all',},
|
||
],
|
||
},
|
||
],
|
||
copyright: `Copyright © ${new Date().getFullYear()} ZHub`,
|
||
},
|
||
prism: {
|
||
theme: lightCodeTheme,
|
||
darkTheme: darkCodeTheme,
|
||
additionalLanguages: ['java'],
|
||
},
|
||
}),
|
||
}
|
||
|
||
module.exports = config
|