0

I am using the theme template and I am trying to change the main page of my website.

That is, how do I remove the index page and replace it with the "Docs" page as the main page on my website?

dedede
  • 197
  • 11

1 Answers1

2
  1. Delete src/pages/index.js
  2. Add the following to docusaurus.config.js
module.exports = {
  // ...
  presets: [
    [
      '@docusaurus/preset-classic',
      {
        docs: {
          routeBasePath: '/', // Set this value to '/'.
          homePageId: 'getting-started', // Set to existing document id.
          // ...
        },
      },
    ],
  ],
  // ...
};

Follow the instructions here

Yangshun Tay
  • 49,270
  • 33
  • 114
  • 141
  • In docusaurus v2 you can't use `homePageId` option any more. See https://docusaurus.io/docs/next/docs-introduction#home-page-docs for more details. – Bart Mar 07 '22 at 09:03