mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
misc(v2): make playground nicer (#1819)
* misc(v2): make code block nicer * misc(v2): update changelog for code + playground * misc(v2): update playground docs
This commit is contained in:
parent
ae678c9dad
commit
1c5a6ee244
13 changed files with 75 additions and 55 deletions
|
@ -150,8 +150,7 @@ If you want to reference another document file, you should use the name of the d
|
|||
For example, if you are in `doc2.md` and you want to reference `doc1.md` and `folder/doc3.md`:
|
||||
|
||||
```md
|
||||
I am referencing a [document](doc1.md).
|
||||
Reference to another [document in a folder](folder/doc3.md)
|
||||
I am referencing a [document](doc1.md). Reference to another [document in a folder](folder/doc3.md)
|
||||
```
|
||||
|
||||
One benefit of this approach is that the links to external files will still work if you are viewing the file on GitHub.
|
||||
|
@ -180,12 +179,12 @@ Example:
|
|||
// docusaurus.config.js
|
||||
module.exports = {
|
||||
themeConfig: {
|
||||
prismTheme: require('prism-react-renderer/themes/vsDark')
|
||||
}
|
||||
prismTheme: require('prism-react-renderer/themes/palenight'),
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
By default, the Prism theme we use is [Night Owl](https://github.com/FormidableLabs/prism-react-renderer/blob/master/themes/nightOwl.js).
|
||||
By default, the Prism theme we use is [Palenight](https://github.com/FormidableLabs/prism-react-renderer/blob/master/src/themes/palenight.js).
|
||||
|
||||
### Interactive code editor
|
||||
|
||||
|
@ -258,5 +257,3 @@ function Clock(props) {
|
|||
);
|
||||
}
|
||||
```
|
||||
|
||||
**Note:** The React Live component is rather big in bundle size. It is an opt-in.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue