The extension for your documentation files is .mdx
, which allows you to write them using Markdown syntax, enhanced with custom extras by Docshub. To begin creating a new document, you can choose from several options:
Using the CLI
You can use the CLI to create a new Markdown file. To do this, run the following the CLI docs:
DocsHub CLI Simplify your workspace setup, Docker configuration, and content creation with a single command. Getting Started
2024-09-04
Creating a new document manually
Make sure to create a getting-started.mdx file beforehand. It is a necessary step for accessing the application for the first time.
- Create a new file in the
src/docs
(source code) or/docs
volume (docker) directory with the.mdx
extension.
# Source code:
src/docs/example.mdx
# Docker:
./docs/example.mdx
- At the beginning of the document, make sure to include the following parameters:
---
title: "Example Document"
sidebarTitle: "Example Document"
description: "Example Document description"
publishDate: "2024-09-04"
---
## Example Heading
Review the full list of available parameters at the end of this page.
- Write your content in the document using Markdown syntax. Also, you can use the following components:
UI Components Below you will find examples of all the formats you can use in your Markdown documentation Mermaid Diagrams How to create diagrams and visualizations using Mermaid.js
Components
2024-10-03
Components
2024-10-03
Params
The following table lists all the fields available to use in the header of your .mdx
files in DocsHub:
Field | Description | Example |
---|---|---|
title | The main title of the document. | "Your Title Here" |
sidebarTitle | The title displayed in the sidebar menu. | "Your Sidebar Title" |
description | A brief description of the document. | "A brief description of the document." |
publishDate | The publication date of the document. | "2024-09-04" |
author.name | The name of the documentβs author. | "Your Name" |
author.url | A link to the authorβs profile or website. | "https://your-profile-link.com" |
---
title: "Example Document"
sidebarTitle: "Example Document"
description: "Example Document description"
publishDate: "2024-09-04"
category: "Example"
author: { name: "Example", url: "https://docshub.vercel.app/" }
---
## Example Heading