Skip to main content

intro

Create your first Doc

Create a Markdown file at docs/hello.md:

docs/hello.md
# Hello

This is my **first document**!

A new document is now available at http://localhost:3000/docs/hello.

Configure the Sidebar

Automatically creates a sidebar from the docs folder.

Add metadata to customize the sidebar label and position:

docs/hello.md
---
sidebar_label: 'Hi!'
sidebar_position: 3
---

# Hello

This is my **first document**!

It is also possible to create your sidebar explicitly in sidebars.js:

sidebars.js
module.exports = {
tutorialSidebar: [
'intro',
'hello',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
},
],
};

Markdown Features

Supports Markdown and a few additional features.

Front Matter

Markdown documents have metadata at the top called Front Matter:

my-doc.md
---
id: my-doc-id
title: My document title
description: My document description
slug: /my-custom-url
---

## Markdown heading

Markdown text with [links](./hello.md)

Regular Markdown links are supported, using url paths or relative file paths.

Images

Regular Markdown images are supported.

You can use absolute paths to reference images in the static directory (static/img/):

![legend](/media/recipe/image2.jpg)

legend

You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them:

![legend](./media/recipe/image2.jpg)

Admonitions

Has a special syntax to create admonitions and callouts:

:::tip My tip

Use this awesome feature option

:::

:::danger Take care

This action is dangerous

:::
My tip

Use this awesome feature option

Take care

This action is dangerous

Insert Video

Example below.