mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-18 19:46:57 +02:00
docs(v2): misc docs updates (#2500)
This commit is contained in:
parent
c47be44680
commit
8018a835e5
10 changed files with 167 additions and 161 deletions
|
@ -5,6 +5,8 @@ title: Creating Pages
|
|||
|
||||
In this section, we will learn about creating ad-hoc pages in Docusaurus using React. This is most useful for creating one-off standalone pages like a showcase page, playground page or support page.
|
||||
|
||||
The functionality of pages is powered by `@docusaurus/plugin-content-pages`.
|
||||
|
||||
## Adding a new page
|
||||
|
||||
<!-- TODO: What will the user see if pages/ is empty? -->
|
||||
|
@ -75,6 +77,12 @@ my-website
|
|||
.
|
||||
```
|
||||
|
||||
:::caution
|
||||
|
||||
All JavaScript/TypeScript files within the `src/pages/` directory will have corresponding website paths generated for them. Do not put reusable components or test files (ending with `.test.js`) into that directory otherwise they will be turned into pages, which might not be intended.
|
||||
|
||||
:::
|
||||
|
||||
## Using React
|
||||
|
||||
React is used as the UI library to create pages. Every page component should export a React component and you can leverage on the expressiveness of React to build rich and interactive content.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue