Demo Wrapper
About 203 wordsLess than 1 minute
2025-03-24
Overview
Sometimes, you may need to add examples in your content but want them to be presented separately from other content. The theme supports adding demo wrapper in Markdown files.
Syntax
::: demo-wrapper
Add your example here
:::
Options
title="xxx"
: Titleno-padding
: No paddingimg
: Use when only containing an imageheight="xxx"
: Height
Example
Image only:
::: demo-wrapper img no-padding

:::
Output:
Markdown content:
::: demo-wrapper title="Title"
### Third-level heading
This is the content within the demo wrapper.
:::
Output:
Title
Third-level heading
This is the content within the demo wrapper.
HTML/Vue code:
::: demo-wrapper
<h1 class="your-demo-title">This is a heading</h1>
<p class="your-demo-paragraph">This is a paragraph</p>
<style>
.your-demo-title {
color: red;
}
.your-demo-paragraph {
color: blue;
}
</style>
:::
Output:
This is a title
This is a paragraph