strapi/docs/docusaurus.config.js

131 lines
3.1 KiB
JavaScript
Raw Normal View History

2022-07-06 21:04:48 +02:00
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const path = require('path');
2024-03-29 18:02:40 +01:00
const {
themes: { github: lightCodeTheme, dracula: darkCodeTheme },
} = require('prism-react-renderer');
2022-07-06 21:04:48 +02:00
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Doc',
tagline: 'Dinosaurs are cool',
2022-11-08 12:03:45 +01:00
url: 'https://contributor.strapi.io',
2022-11-08 12:01:55 +01:00
baseUrl: '/',
2022-11-09 09:51:23 +01:00
onBrokenLinks: 'warn',
2022-07-06 21:04:48 +02:00
onBrokenMarkdownLinks: 'warn',
2022-10-18 12:42:35 +02:00
favicon: 'img/favicon.png',
2022-07-06 21:04:48 +02:00
organizationName: 'strapi',
projectName: 'strapi',
2022-08-19 14:03:16 +02:00
trailingSlash: false,
themes: ['@docusaurus/theme-mermaid'],
2022-07-06 21:04:48 +02:00
// 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'],
},
markdown: {
mermaid: true,
},
plugins: [
() => ({
name: 'resolve-react',
configureWebpack() {
return {
resolve: {
alias: {
2022-11-09 09:51:23 +01:00
react: path.resolve(__dirname, './node_modules/react'),
},
},
};
},
}),
[
'docusaurus-plugin-typedoc',
// Plugin / TypeDoc options
{
entryPoints: ['../packages/core/strapi/src/admin.ts'],
tsconfig: '../packages/core/strapi/tsconfig.build.json',
entryDocument: null,
out: 'exports',
watch: process.env.TYPEDOC_WATCH,
},
],
[
'@cmfcmf/docusaurus-search-local',
{
indexBlog: false,
},
],
],
2022-07-06 21:04:48 +02:00
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
{
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
2022-08-26 18:41:48 +02:00
editUrl: 'https://github.com/strapi/strapi/tree/main/docs/',
2022-07-06 21:04:48 +02:00
},
blog: false,
},
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
{
navbar: {
2022-08-26 18:41:48 +02:00
title: 'Contributor documentation',
2022-07-06 21:04:48 +02:00
hideOnScroll: true,
logo: {
alt: 'Doc',
src: 'img/logo.svg',
srcDark: 'img/logo_dark.svg',
width: 100,
},
items: [
{
2023-05-11 12:00:42 +01:00
type: 'docSidebar',
position: 'left',
sidebarId: 'guides',
label: 'Guides',
},
{
type: 'docSidebar',
2022-07-06 21:04:48 +02:00
position: 'left',
2023-05-11 12:00:42 +01:00
sidebarId: 'docs',
2022-07-06 21:04:48 +02:00
label: 'Docs',
},
{
type: 'docSidebar',
position: 'left',
sidebarId: 'api',
2023-05-11 12:00:42 +01:00
label: 'API Reference',
2022-07-06 21:04:48 +02:00
},
{
type: 'docSidebar',
position: 'left',
sidebarId: 'exports',
label: 'Exports',
},
2022-09-13 17:09:54 +02:00
{
type: 'docSidebar',
position: 'left',
2023-05-11 12:00:42 +01:00
sidebarId: 'rfcs',
label: 'RFCs',
2022-09-13 17:09:54 +02:00
},
2022-07-06 21:04:48 +02:00
],
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
},
};
module.exports = config;