mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-02 19:57:25 +02:00
* feat(v2): add optional custom wrapper class name for pages based on theme classic Layout * feat(v2): add optional custom wrapper class name for markdown pages * fix TS types
1.2 KiB
1.2 KiB
title | description | wrapperClassName |
---|---|---|
Markdown Page example title | Markdown Page example description | docusaurus-markdown-example |
Markdown page
This is a page generated from markdown to illustrate the markdown page feature.
It supports all the regular MDX features, as you can see:
:::info
Useful information.
:::
function Button() {
return (
<button type="button" onClick={() => alert('hey')}>
Click me!
</button>
);
}
Using relative path
Using absolute path
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<Tabs defaultValue="apple" values={[ {label: 'Apple', value: 'apple'}, {label: 'Orange', value: 'orange'}, {label: 'Banana', value: 'banana'} ]}>This is an apple 🍎This is an orange 🍊This is a banana 🍌
Import Mdx and Md files
// *.md file
import Chapter1 from './_chapter1.md';
<Chapter1 />;
// *.mdx file
import Chapter2 from './_chapter2.mdx';
<Chapter2 />;
import Chapter1 from './_chapter1.md';
import Chapter2 from './_chapter2.mdx';