如何设置"Docs"为主页面
How to set "Docs" as the main page
我正在使用主题模板,我正在尝试更改我网站的主页。
也就是说,如何删除索引页并将其替换为 "Docs" 页面作为我网站的主页?
- 删除
src/pages/index.js
- 将以下内容添加到
docusaurus.config.js
module.exports = {
// ...
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
routeBasePath: '/', // Set this value to '/'.
homePageId: 'getting-started', // Set to existing document id.
// ...
},
},
],
],
// ...
};
按照说明进行操作here
我正在使用主题模板,我正在尝试更改我网站的主页。
也就是说,如何删除索引页并将其替换为 "Docs" 页面作为我网站的主页?
- 删除
src/pages/index.js
- 将以下内容添加到
docusaurus.config.js
module.exports = {
// ...
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
routeBasePath: '/', // Set this value to '/'.
homePageId: 'getting-started', // Set to existing document id.
// ...
},
},
],
],
// ...
};
按照说明进行操作here