mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 16:47:26 +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
|
yarn create docusaurus
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx create-docusaurus@latest
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Please see the [installation documentation](https://docusaurus.io/docs/installation).
|
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.
|
Markdown code blocks are supported with Syntax highlighting.
|
||||||
|
|
||||||
|
````md
|
||||||
```jsx title="src/components/HelloDocusaurus.js"
|
```jsx title="src/components/HelloDocusaurus.js"
|
||||||
function HelloDocusaurus() {
|
function HelloDocusaurus() {
|
||||||
return (
|
return <h1>Hello, Docusaurus!</h1>;
|
||||||
<h1>Hello, Docusaurus!</h1>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
````
|
||||||
|
|
||||||
```jsx title="src/components/HelloDocusaurus.js"
|
```jsx title="src/components/HelloDocusaurus.js"
|
||||||
function HelloDocusaurus() {
|
function HelloDocusaurus() {
|
||||||
|
@ -79,6 +79,7 @@ function HelloDocusaurus() {
|
||||||
|
|
||||||
Docusaurus has a special syntax to create admonitions and callouts:
|
Docusaurus has a special syntax to create admonitions and callouts:
|
||||||
|
|
||||||
|
```md
|
||||||
:::tip My tip
|
:::tip My tip
|
||||||
|
|
||||||
Use this awesome feature option
|
Use this awesome feature option
|
||||||
|
@ -90,6 +91,7 @@ Docusaurus has a special syntax to create admonitions and callouts:
|
||||||
This action is dangerous
|
This action is dangerous
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
```
|
||||||
|
|
||||||
:::tip My tip
|
:::tip My tip
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue