Skip to content

admin/dorfarchiv

PublicMirror

Mirror of https://forge.levinkeller.de/levin/dorfarchiv.git

Levin KellerInitial commit140869eHistory
43 lines · 1015 B
1---
2sidebar_position: 1
3---
4
5# Create a Page
6
7Add **Markdown or React** files to `src/pages` to create a **standalone page**:
8
9- `src/pages/index.js` → `localhost:3000/`
10- `src/pages/foo.md` → `localhost:3000/foo`
11- `src/pages/foo/bar.js` → `localhost:3000/foo/bar`
12
13## Create your first React Page
14
15Create a file at `src/pages/my-react-page.js`:
16
17```jsx title="src/pages/my-react-page.js"
18import React from 'react';
19import Layout from '@theme/Layout';
20
21export default function MyReactPage() {
22 return (
23 <Layout>
24 <h1>My React page</h1>
25 <p>This is a React page</p>
26 </Layout>
27 );
28}
29```
30
31A new page is now available at [http://localhost:3000/my-react-page](http://localhost:3000/my-react-page).
32
33## Create your first Markdown Page
34
35Create a file at `src/pages/my-markdown-page.md`:
36
37```mdx title="src/pages/my-markdown-page.md"
38# My Markdown page
39
40This is a Markdown page
41```
42
43A new page is now available at [http://localhost:3000/my-markdown-page](http://localhost:3000/my-markdown-page).