2025-04-01 09:55:25 +07:00

55 lines
1.3 KiB
Markdown

---
title: Add a doc
description: A short description of this document
sidebar_position: 1
---
# Add a doc
## Create a New Document
You can create a new document using either a **Markdown file** or a **React file**. Follow the steps below:
### Option 1: Markdown File 📝
![Markdown Logo](https://markdown-here.com/img/icon256.png)
Inside the `docs` folder, create a new Markdown (`.md` or `.mdx`) file.
For example, create a file called `new-doc.md`:
```sh
touch new-doc.md
```
Then, open the file in a text editor and add the following content:
```md
---
id: new-doc
title: My New Document
description: A short description of this document
---
# My New Document
Welcome to my new Docusaurus documentation page!
## Section 1
This is an example of a section.
## Section 2
More content can go here.
```
Once you save the file, it will automatically be added to your Docusaurus site. You can access it by navigating to:
[http://localhost:3000/docs/new-doc](http://localhost:3000/docs/new-doc)
Additionally, the new document will appear in the sidebar under the **Docs** section.
If you're new to Markdown or want to explore its features, you can learn more about Markdown syntax and capabilities in the [Markdown Features Guide](../docusaurus-guide/basics/markdown-features).
### Option 2: React file
Just don't