mirror of
				https://github.com/strapi/strapi.git
				synced 2025-10-31 09:56:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			103 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			103 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // @ts-check
 | |
| // Note: type annotations allow type checking and IDEs autocompletion
 | |
| const path = require('path');
 | |
| const lightCodeTheme = require('prism-react-renderer/themes/github');
 | |
| const darkCodeTheme = require('prism-react-renderer/themes/dracula');
 | |
| 
 | |
| /** @type {import('@docusaurus/types').Config} */
 | |
| const config = {
 | |
|   title: 'Doc',
 | |
|   tagline: 'Dinosaurs are cool',
 | |
|   url: 'https://contributor.strapi.io',
 | |
|   baseUrl: '/',
 | |
|   onBrokenLinks: 'warn',
 | |
|   onBrokenMarkdownLinks: 'warn',
 | |
|   favicon: 'img/favicon.png',
 | |
|   organizationName: 'strapi',
 | |
|   projectName: 'strapi',
 | |
|   trailingSlash: false,
 | |
| 
 | |
|   // 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'],
 | |
|   },
 | |
|   plugins: [
 | |
|     () => ({
 | |
|       name: 'resolve-react',
 | |
|       configureWebpack() {
 | |
|         return {
 | |
|           resolve: {
 | |
|             alias: {
 | |
|               react: path.resolve(__dirname, './node_modules/react'),
 | |
|             },
 | |
|           },
 | |
|         };
 | |
|       },
 | |
|     }),
 | |
|   ],
 | |
|   presets: [
 | |
|     [
 | |
|       'classic',
 | |
|       /** @type {import('@docusaurus/preset-classic').Options} */
 | |
|       {
 | |
|         docs: {
 | |
|           routeBasePath: '/',
 | |
|           sidebarPath: require.resolve('./sidebars.js'),
 | |
|           editUrl: 'https://github.com/strapi/strapi/tree/main/docs/',
 | |
|         },
 | |
|         blog: false,
 | |
|       },
 | |
|     ],
 | |
|   ],
 | |
| 
 | |
|   themeConfig:
 | |
|     /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
 | |
|     {
 | |
|       navbar: {
 | |
|         title: 'Contributor documentation',
 | |
|         hideOnScroll: true,
 | |
|         logo: {
 | |
|           alt: 'Doc',
 | |
|           src: 'img/logo.svg',
 | |
|           srcDark: 'img/logo_dark.svg',
 | |
|           width: 100,
 | |
|         },
 | |
|         items: [
 | |
|           {
 | |
|             type: 'docSidebar',
 | |
|             position: 'left',
 | |
|             sidebarId: 'guides',
 | |
|             label: 'Guides',
 | |
|           },
 | |
|           {
 | |
|             type: 'docSidebar',
 | |
|             position: 'left',
 | |
|             sidebarId: 'docs',
 | |
|             label: 'Docs',
 | |
|           },
 | |
|           {
 | |
|             type: 'docSidebar',
 | |
|             position: 'left',
 | |
|             sidebarId: 'api',
 | |
|             label: 'API Reference',
 | |
|           },
 | |
|           {
 | |
|             type: 'docSidebar',
 | |
|             position: 'left',
 | |
|             sidebarId: 'rfcs',
 | |
|             label: 'RFCs',
 | |
|           },
 | |
|         ],
 | |
|       },
 | |
|       prism: {
 | |
|         theme: lightCodeTheme,
 | |
|         darkTheme: darkCodeTheme,
 | |
|       },
 | |
|     },
 | |
| };
 | |
| 
 | |
| module.exports = config;
 | 
