mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-19 12:07:00 +02:00
* feat: add getting started doc at classic inital templates
* fix: improve the contents of getting started page
* fix: fix slug routing
* fix: rename gettingStarted to getting-started and re-adjust the content
* feat: add markdown-features docs
* feat: add a page on how to create a simple document
* feat: add a page on how to create pages
* feat: add create a post doc
* feat: add thank you page with whats next
* feat : update sidebar.js
* feat : add introduction content
* feat : add self hosting content
* feat : add GitHub pages content
* fix : remove automatically deploying with github actions content
* feat : add deploying to netlify
* feat : add Translate your site
* add : Manage versions
* fix : formatted docs with prettier
* Revert "fix : formatted docs with prettier"
This reverts commit af8c0b48
* run prettier to init templates with fixes
* complete new init template
* rename manage-docs-versions
* change wording
* refresh config file
* rework init template homepage
* minor changes
Co-authored-by: Lisa Chandra <52909743+lisa761@users.noreply.github.com>
Co-authored-by: Javid <singularity.javid@gmail.com>
Co-authored-by: ShinteiMai <stevenhanselgo@gmail.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
45 lines
917 B
Markdown
45 lines
917 B
Markdown
---
|
|
title: Create a Page
|
|
---
|
|
|
|
Add **Markdown or React** files to `src/pages` to create **standalone pages**:
|
|
|
|
- `src/pages/index.js` -> `localhost:3000/`
|
|
- `src/pages/foo.md` -> `localhost:3000/foo`
|
|
- `src/pages/foo/bar.js` -> `localhost:3000/foo/bar`
|
|
|
|
## Create a React Page
|
|
|
|
Create a file at `src/pages/my-react-page.js`:
|
|
|
|
```jsx title="src/pages/my-react-page.js"
|
|
import React from 'react';
|
|
import Layout from '@theme/Layout';
|
|
|
|
function HelloWorld() {
|
|
return (
|
|
<Layout>
|
|
<h1>My React page</h1>
|
|
<p>This is a React page</p>
|
|
</Layout>
|
|
);
|
|
}
|
|
```
|
|
|
|
A new page is now available at `http://localhost:3000/my-react-page`.
|
|
|
|
## Create a Markdown Page
|
|
|
|
Create a file at `src/pages/my-markdown-page.md`:
|
|
|
|
```mdx title="src/pages/my-markdown-page.md"
|
|
---
|
|
title: My Markdown page
|
|
---
|
|
|
|
# My Markdown page
|
|
|
|
This is a Markdown page
|
|
```
|
|
|
|
A new page is now available at `http://localhost:3000/my-markdown-page`.
|