Markdown
JAAD supports CommonMark and GitHub Flavored Markdown. JAAMD adds the features below automatically.
Table of contents
Use :::toc to generate a table of contents:
:::toc[Components]
- [Table of contents](#table-of-contents)
- [Code tabs](#code-tabs)
- [Alerts](#alerts)
- [Spoilers](#spoilers)
:::
Code tabs
Use :::code-tabs and add the tab label after each language identifier:
:::code-tabs
```bash npm
npm install
```
```bash pnpm
pnpm install
```
:::
npm install
pnpm install
Alerts
Use GitHub-style blockquote alerts:
> [!NOTE]
> Useful context.
> [!WARNING]
> A consequence the reader should avoid.
NOTE
Useful context.
Available types are NOTE, TIP, IMPORTANT, WARNING and CAUTION.
Spoilers
Add the spoiler class to inline or block HTML:
The answer is <span class="spoiler">42</span>.
Spoilers are keyboard accessible and return to their hidden state after a page reload.
Automatic enhancements
JAAD also adds copy buttons to code blocks, links to headings, an image
lightbox and animated <details> elements. No configuration is required.