mirror of
https://github.com/logto-io/logto.git
synced 2024-12-23 20:33:16 -05:00
00e32f08da
* docs: api reference * chore(docs): add peer denpendencies for redoc-cli
131 lines
3.2 KiB
JavaScript
131 lines
3.2 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');
|
|
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: {
|
|
routeBasePath: '/',
|
|
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/',
|
|
},
|
|
blog: false,
|
|
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',
|
|
},
|
|
{
|
|
href: '/api',
|
|
target: '_blank',
|
|
position: 'left',
|
|
label: 'API',
|
|
},
|
|
{
|
|
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: '/',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
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;
|