mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 15:17:23 +02:00
fix(create-docusaurus): fix init template code blocks, and little improvements (#9696)
Co-authored-by: Ivan Mar (sOkam!) <7308253+heysokam@users.noreply.github.com>
This commit is contained in:
parent
fd49301a45
commit
e0052edc4c
2 changed files with 19 additions and 13 deletions
|
@ -10,6 +10,10 @@ npm init docusaurus
|
|||
yarn create docusaurus
|
||||
```
|
||||
|
||||
```bash
|
||||
npx create-docusaurus@latest
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Please see the [installation documentation](https://docusaurus.io/docs/installation).
|
||||
|
|
|
@ -61,13 +61,13 @@ You can reference images relative to the current file as well. This is particula
|
|||
|
||||
Markdown code blocks are supported with Syntax highlighting.
|
||||
|
||||
```jsx title="src/components/HelloDocusaurus.js"
|
||||
function HelloDocusaurus() {
|
||||
return (
|
||||
<h1>Hello, Docusaurus!</h1>
|
||||
)
|
||||
}
|
||||
```
|
||||
````md
|
||||
```jsx title="src/components/HelloDocusaurus.js"
|
||||
function HelloDocusaurus() {
|
||||
return <h1>Hello, Docusaurus!</h1>;
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
```jsx title="src/components/HelloDocusaurus.js"
|
||||
function HelloDocusaurus() {
|
||||
|
@ -79,17 +79,19 @@ function HelloDocusaurus() {
|
|||
|
||||
Docusaurus has a special syntax to create admonitions and callouts:
|
||||
|
||||
:::tip My tip
|
||||
```md
|
||||
:::tip My tip
|
||||
|
||||
Use this awesome feature option
|
||||
Use this awesome feature option
|
||||
|
||||
:::
|
||||
:::
|
||||
|
||||
:::danger Take care
|
||||
:::danger Take care
|
||||
|
||||
This action is dangerous
|
||||
This action is dangerous
|
||||
|
||||
:::
|
||||
:::
|
||||
```
|
||||
|
||||
:::tip My tip
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue