Docusaurus lets you create standalone pages — such as a homepage, showcase, playground, or support page — completely separate from the docs system. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/facebook/docusaurus/llms.txt
Use this file to discover all available pages before exploring further.
@docusaurus/plugin-content-pages plugin maps every file in src/pages/ to a URL, supporting both React components and Markdown files.
Standalone pages do not have sidebars. Only docs have sidebars. If you want navigation between related content, use the docs plugin instead.
Routing
Any JavaScript, TypeScript, or Markdown file placed insidesrc/pages/ is automatically converted to a website page. The URL path mirrors the file system hierarchy:
_ are ignored and will not produce routes. Test files (.test.js) and files inside __tests__ directories are also excluded by default.
Adding a React page
React is the UI library used to create pages. Every page must export a default React component. Wrap your content in theLayout component from @theme/Layout to get the site navbar and footer.
Adding a Markdown page
Markdown pages are simpler to write and always use the theme layout automatically. Create a file atsrc/pages/hello.md:
src/pages/hello.md
http://localhost:3000/hello. Markdown pages are less flexible than React pages but support the full power of MDX — you can embed React components inside them.
Co-locating page assets
For pages with their own styles or assets, place the page inside its own directory. This keeps related files grouped:src/pages/support/index.jsx
Handling duplicate routes
If two files resolve to the same URL, Docusaurus warns you when runningyarn start or yarn build. The last file wins, overriding the other. Resolve duplicates by renaming or removing the conflicting file.
Duplicate route example
Duplicate route example
If you have both
src/pages/foo.js and src/pages/foo/index.js, both map to /foo. Docusaurus will log a warning and keep one. Remove or rename one of the files to fix the conflict.Controlling excluded files
Controlling excluded files
Use the
exclude option in the pages plugin configuration to specify additional glob patterns for files that should not become routes:docusaurus.config.js