// @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'); const path = require('path'); /** @type {import('@docusaurus/types').Config} */ const config = { title: 'Logto Docs', tagline: 'Dinosaurs are cool', url: 'https://your-docusaurus-test-site.com', baseUrl: '/', onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', favicon: 'img/favicon.ico', organizationName: 'logto-io', // Usually your GitHub org/user name. projectName: 'website-docs', // Usually your repo name. i18n: { defaultLocale: 'en', locales: ['en', 'zh-cn'], }, presets: [ [ 'classic', /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { breadcrumbs: false, sidebarPath: require.resolve('./sidebars.js'), // Please change this to your repo. editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', }, theme: { customCss: require.resolve('./src/css/custom.css'), }, }), ], ], themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ navbar: { title: 'Logto Docs', logo: { alt: 'Logto Logo', src: 'img/logo.svg', }, items: [ { type: 'doc', docId: 'tutorial/README', position: 'left', label: 'Tutorial', }, { type: 'doc', docId: 'sdk/README', position: 'left', label: 'SDK', }, { type: 'localeDropdown', position: 'right', }, { href: 'https://github.com/logto-io/logto', label: 'GitHub', position: 'right', }, ], }, footer: { style: 'dark', links: [ { title: 'Docs', items: [ { label: 'Tutorial', to: '/docs/tutorial', }, ], }, { title: 'Community', items: [ ], }, { title: 'More', items: [ { label: 'GitHub', href: 'https://github.com/logto-io/logto', }, ], }, ], copyright: `Copyright © ${new Date().getFullYear()} Silverhand Inc. Built with Docusaurus.`, }, prism: { theme: lightCodeTheme, darkTheme: darkCodeTheme, additionalLanguages: ['swift', 'kotlin', 'groovy', 'java'], }, }), plugins: [ async function addAliasPlugin() { return ({ name: 'add-alias-plugin', configureWebpack: () => ({ resolve: { alias: { '@components': path.resolve(__dirname, './src/components') } } }) }); } ] }; module.exports = config;