diff --git a/website/docs/blog.md b/website/docs/blog.md index c9376d8206..10d2e0b3bb 100644 --- a/website/docs/blog.md +++ b/website/docs/blog.md @@ -140,12 +140,6 @@ https://{your-domain}/blog/atom.xml You can run your Docusaurus 2 site without a landing page and instead have your blog's post list page as the index page. Set the `routeBasePath` to be `'/'` to indicate it's the root path. -:::caution - -Don't forget to delete the existing homepage at `./src/pages/index.js` - -::: - ```js {9} title="docusaurus.config.js" module.exports = { // ... @@ -163,9 +157,9 @@ module.exports = { }; ``` -:::note +:::caution -Make sure there's no `index.js` page in `src/pages` or else there will be two files mapping to the same route! +Don't forget to delete the existing homepage at `./src/pages/index.js` or else there will be two files mapping to the same route! ::: diff --git a/website/docs/docs.md b/website/docs/docs.md index 92054f0600..0cf80d13b6 100644 --- a/website/docs/docs.md +++ b/website/docs/docs.md @@ -325,15 +325,9 @@ module.exports = { ## Docs-only mode -If you just want the documentation feature, you can enable "docs-only mode". +If you only want the documentation feature, you can run your Docusaurus 2 site without a landing page and display your documentation page as the index page instead. -To achieve this, set the `routeBasePath` property of the `docs` object in `@docusaurus/preset-classic` in `docusaurus.config.js` to the root of your site, and also in that object set the `homePageId` property with the value of the document ID that you show as root of the docs. - -:::caution - -Don't forget to delete the existing homepage at `./src/pages/index.js` - -::: +To enable docs-only mode, set the `routeBasePath` property of the `docs` object to the root of your site. Also, set the `homePageId` property to the ID of the document that you wish to show by default. :::note @@ -362,8 +356,14 @@ module.exports = { Now, when visiting your site, it will show your initial document instead of a landing page. -:::tip +:::caution -There's also a "blog-only mode", for those who only want to use the blog component of Docusaurus 2. You can use the same method detailed above, except that you need to delete the `/src/pages/index.js` file. Follow the setup instructions on [Blog-only mode](blog.md#blog-only-mode). +You should delete the existing homepage at `./src/pages/index.js`, or else there will be two files mapping to the same route! + +::: + +:::tip + +There's also a "blog-only mode" for those who only want to use the blog feature of Docusaurus 2. You can use the same method detailed above. Follow the setup instructions on [Blog-only mode](blog.md#blog-only-mode). ::: diff --git a/website/versioned_docs/version-2.0.0-alpha.58/docs.md b/website/versioned_docs/version-2.0.0-alpha.58/docs.md index fbebab73f6..0cf80d13b6 100644 --- a/website/versioned_docs/version-2.0.0-alpha.58/docs.md +++ b/website/versioned_docs/version-2.0.0-alpha.58/docs.md @@ -325,9 +325,9 @@ module.exports = { ## Docs-only mode -If you just want the documentation feature, you can enable "docs-only mode". +If you only want the documentation feature, you can run your Docusaurus 2 site without a landing page and display your documentation page as the index page instead. -To achieve this, set the `routeBasePath` property of the `docs` object in `@docusaurus/preset-classic` in `docusaurus.config.js` to the root of your site, and also in that object set the `homePageId` property with the value of the document ID that you show as root of the docs. +To enable docs-only mode, set the `routeBasePath` property of the `docs` object to the root of your site. Also, set the `homePageId` property to the ID of the document that you wish to show by default. :::note @@ -356,8 +356,14 @@ module.exports = { Now, when visiting your site, it will show your initial document instead of a landing page. -:::tip +:::caution -There's also a "blog-only mode", for those who only want to use the blog component of Docusaurus 2. You can use the same method detailed above, except that you need to delete the `/src/pages/index.js` file. Follow the setup instructions on [Blog-only mode](blog.md#blog-only-mode). +You should delete the existing homepage at `./src/pages/index.js`, or else there will be two files mapping to the same route! + +::: + +:::tip + +There's also a "blog-only mode" for those who only want to use the blog feature of Docusaurus 2. You can use the same method detailed above. Follow the setup instructions on [Blog-only mode](blog.md#blog-only-mode). :::