代码块
文档中的代码块超级厉害 💪。
Code title
You can add a title to the code block by adding a title
key after the language (leave a space between them).
```jsx title="/src/components/HelloCodeTitle.js"
function HelloCodeTitle(props) {
return <h1>Hello, {props.name}</h1>;
}
```
http://localhost:3000
/src/components/HelloCodeTitle.js
function HelloCodeTitle(props) {
return <h1>Hello, {props.name}</h1>;
}
Syntax highlighting
代码块是使用 3 个反引号包裹的文本块。 You may check out this reference for the specifications of MDX.
```js
console.log('每个仓库都应该有个吉祥物。');
```