mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-19 20:17:06 +02:00
feat(v2): markdown pages (#3158)
* markdown pages POC * add remark admonition, mdx provider, yarn2npm... * pluginContentPages md/mdx tests * pluginContentPages md/mdx tests * add relative file path test link to showcase link problem * fix Markdown pages issues after merge * fix broken links found in markdown pages * fix tests * factorize common validation in @docusaurus/utils-validation * add some documentation * add using plugins doc * minor md pages fixes
This commit is contained in:
parent
53b28d2bb2
commit
7cceee7e38
30 changed files with 570 additions and 93 deletions
34
website/src/pages/examples/markdownPageExample.md
Normal file
34
website/src/pages/examples/markdownPageExample.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
title: Markdown Page example title
|
||||
description: Markdown Page example description
|
||||
---
|
||||
|
||||
# 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.
|
||||
|
||||
:::
|
||||
|
||||
```jsx live
|
||||
function Button() {
|
||||
return (
|
||||
<button type="button" onClick={() => alert('hey')}>
|
||||
Click me!
|
||||
</button>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
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'} ]}><TabItem value="apple">This is an apple 🍎</TabItem><TabItem value="orange">This is an orange 🍊</TabItem><TabItem value="banana">This is a banana 🍌</TabItem></Tabs>
|
Loading…
Add table
Add a link
Reference in a new issue