// @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: '高性能、轻量级的消息中间件,支持发布订阅、RPC调用、延时消息等功能', favicon: 'img/favicon.ico', // Set the production url of your site here url: 'https://zhub.dev', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: '/', customFields: { // 添加自定义输出目录 outDir: 'dist', }, // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. organizationName: 'zhub', // Usually your GitHub org/user name. projectName: 'zhub-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: 'zh-Hans', locales: ['zh-Hans'], }, 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: 'ZHub 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'], }, metadata: [ {name: 'keywords', content: '消息中间件,消息队列,RPC,发布订阅,微服务,Java,SpringBoot'}, {name: 'description', content: 'ZHub 是一个轻量级、高性能的消息中间件,支持发布订阅、RPC调用、延时消息、广播等功能,适用于微服务架构'}, {property: 'og:type', content: 'website'}, {property: 'og:title', content: 'ZHub - 轻量级消息中间件'}, {property: 'og:description', content: '高性能、轻量级的消息中间件,支持发布订阅、RPC调用、延时消息等功能'}, {property: 'og:image', content: 'https://zhub.dev/img/docusaurus-social-card.jpg'}, {name: 'twitter:card', content: 'summary_large_image'}, {name: 'twitter:title', content: 'ZHub - 轻量级消息中间件'}, {name: 'twitter:description', content: '高性能、轻量级的消息中间件,支持发布订阅、RPC调用、延时消息等功能'}, {name: 'twitter:image', content: 'https://zhub.dev/img/docusaurus-social-card.jpg'}, ], }), } module.exports = config