docusaurus/website/src/pages/examples/markdownPageExample.md
Bartosz Kaszubowski f9944cb2fc
feat(v2): add optional custom wrapper class name for pages based on theme classic Layout (#3457)
* 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
2020-09-23 15:38:17 +03:00

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';