Remove the Homepage
https://stackoverflow.com/questions/61999271/how-to-set-docs-as-the-main-page
Remove the homepage so visitors land on the docs directly.
- Delete or archive the
src/pagesdirectory. - Add the
routeBasePathoption todocusaurus.config.ts:
docusaurus.config.ts
module.exports = {
// ...
presets: [
[
'classic',
{
docs: { routeBasePath: '/', sidebarPath: './sidebars.ts' },
// ...
},
],
],
// ...
};
- Open the Markdown file you want to use as the landing page (e.g.,
docs/intro.md) and add the following front matter at the top:
docs/intro.md
---
title: Introduction
slug: /
sidebar_position: 1
---
# Introduction
Explore more by clicking here