0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/docs/docusaurus.config.js
2022-04-19 14:12:46 +08:00

112 lines
2.8 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: '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'],
},
}),
};
module.exports = config;