Markdown Extensions
Dorcs includes several built-in markdown extensions that enhance your documentation without requiring any plugins.
Accordion
The accordion extension allows you to create collapsible content sections in your markdown.
Usage:
:::accordion Click to expand
This is the accordion content.
It can contain **markdown** formatting.
- Lists
- Code blocks
- And more!
:::
Click to expand
This is the accordion content.
It can contain markdown formatting.
It can contain markdown formatting.
- Lists
- Code blocks
- And more!
Syntax:
- Start with
:::accordionfollowed by the title - Content follows on the next lines
- End with
:::
The accordion uses the native HTML <details> element, so no JavaScript is required.
Alerts
The alerts extension supports GitHub-style alert blocks for highlighting important information.
Usage:
> **ALERT:NOTE**
> This is a note alert.
> [!TIP]
> This is a tip alert.
> [!IMPORTANT]
> This is an important alert.
> [!WARNING]
> This is a warning alert.
> [!CAUTION]
> This is a caution alert.
Note
This is a note alert.
Tip
This is a tip alert.
Important
This is an important alert.
Warning
This is a warning alert.
Caution
This is a caution alert.
Syntax:
- Start with
> [!TYPE]where TYPE is one of: NOTE, TIP, IMPORTANT, WARNING, CAUTION - Continue with
>on subsequent lines for the alert content - INFO is automatically converted to NOTE
Supported Types:
NOTE- Informational contentTIP- Helpful tipsIMPORTANT- Important informationWARNING- WarningsCAUTION- Cautions
LaTex Support
dorcs supports LaTex math rendering using KaTeX. Simply enclose your math in $$ tags:
$$
f(x) = \int_{-\infty}^\infty
\hat f(\xi)\,e^{2 \pi i \xi x}
\,d\xi
$$
Result:
Or simply use inline math:
A pi function $f(x) = x \cdot \pi$
Result:
A pi function
Mermaid Diagrams
dorcs supports Mermaid diagrams for flowcharts, sequence diagrams, and more. Enclose your Mermaid code in mermaid code fences:
```mermaid
graph TD
A[Docs server] --> B[goldmark-mermaid]
B --> C[Browser]
C --> D[Rendered diagram]
```
Result:
graph TD A[Docs server] --> B[goldmark-mermaid] B --> C[Browser] C --> D[Rendered diagram]