const { resolve } = require('path');
const pkg = require('react-day-picker/package.json');
const pkgPath = '../packages/react-day-picker';

const { transpileCodeblocks } = require('remark-typescript-tools');

module.exports = {
  title: 'React DayPicker',
  tagline: 'Date picker component for React',
  url: 'https://react-day-picker.js.org',
  baseUrl: '/',
  favicon: 'images/favicon.ico',
  organizationName: 'gpbl',
  projectName: 'react-day-picker',
  themeConfig: {
    navbar: {
      title: 'DayPicker',
      logo: {
        alt: 'DayPicker Logo',
        src: 'images/logo.png'
      },
      items: [
        {
          to: 'start',
          label: 'Documentation',
          activeBaseRegex: '(start|basics|guides)'
        },
        {
          to: 'api/interfaces/daypickerprops',
          label: 'Component Props'
        },
        {
          to: 'api',
          label: 'API Reference',
          activeBaseRegex: '!(api/interfaces/daypickerprops)'
        },
        { to: 'changelog', label: `v${pkg.version}`, position: 'right' },
        {
          href: 'https://github.com/gpbl/react-day-picker',
          label: 'GitHub',
          position: 'right'
        }
      ]
    },
    gtag: {
      trackingID: 'UA-68185118-1'
    },
    prism: {
      theme: require('prism-react-renderer/themes/github'),
      darkTheme: require('prism-react-renderer/themes/shadesOfPurple')
    }
  },
  presets: [
    [
      '@docusaurus/preset-classic',
      {
        docs: {
          sidebarPath: require.resolve('./config/sidebar.js'),
          showLastUpdateAuthor: true,
          showLastUpdateTime: true,
          routeBasePath: '/',
          remarkPlugins: [
            [
              transpileCodeblocks,
              {
                compilerSettings: {
                  tsconfig: resolve(__dirname, '../website/tsconfig.json'),
                  externalResolutions: {}
                }
              }
            ]
          ]
        },
        // pages: false,
        theme: {
          customCss: require.resolve('./config/custom.css')
        }
      }
    ]
  ],
  plugins: [
    [
      'docusaurus-plugin-typedoc',
      {
        // Plugin settings
        sidebar: {
          sidebarFile: './config/typedoc-sidebar.js'
        },

        // Typedoc settings
        entryPoints: [`${pkgPath}/src/index.ts`],
        tsconfig: `${pkgPath}/tsconfig.json`,
        allReflectionsHaveOwnDocument: true,
        readme: 'none',
        disableSources: true,

        // Markdown plugin settings
        hideProjectName: true,
        hideBreadcrumbs: true,
        hideInPageTOC: true,
        indexTitle: 'API Reference'
      }
    ]
  ]
};

@@ -1656,315 +1656,8 @@
  '/'
-,%0A          remarkPlugins: %5B%0A            %5B%0A              transpileCodeblocks,%0A              %7B%0A                compilerSettings: %7B%0A                  tsconfig: resolve(__dirname, '../website/tsconfig.json'),%0A                  externalResolutions: %7B%7D%0A                %7D%0A              %7D%0A            %5D%0A          %5D
 %0A   

Remove plugin