mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-04 03:43:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			97 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			97 lines
		
	
	
		
			2.3 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: 'doc',
 | 
						|
            position: 'left',
 | 
						|
            docId: 'index',
 | 
						|
            label: 'Docs',
 | 
						|
          },
 | 
						|
          {
 | 
						|
            type: 'docSidebar',
 | 
						|
            position: 'left',
 | 
						|
            sidebarId: 'api',
 | 
						|
            label: 'API',
 | 
						|
          },
 | 
						|
          {
 | 
						|
            type: 'docSidebar',
 | 
						|
            position: 'left',
 | 
						|
            sidebarId: 'community',
 | 
						|
            label: 'Community',
 | 
						|
          },
 | 
						|
        ],
 | 
						|
      },
 | 
						|
      prism: {
 | 
						|
        theme: lightCodeTheme,
 | 
						|
        darkTheme: darkCodeTheme,
 | 
						|
      },
 | 
						|
    },
 | 
						|
};
 | 
						|
 | 
						|
module.exports = config;
 |