mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-09 05:16:23 +10:00
add badge
This commit is contained in:
@@ -133,7 +133,7 @@ Danger zone, do not proceed
|
||||
|
||||
- [vuepress-plugin-container](https://vuepress.github.io/plugins/container/)
|
||||
|
||||
## Syntax Highlighting in Code Blocks
|
||||
## Syntax Highlighting in Code Blocks <Badge text="default theme"/>
|
||||
|
||||
VuePress uses [Prism](https://prismjs.com/) to highlight language syntax in markdown code blocks, using coloured text. Prism supports a wide variety of programming languages. All you need to do is append a valid language alias to the beginning backticks for the code block:
|
||||
|
||||
@@ -161,7 +161,7 @@ export default {
|
||||
|
||||
Check out [the list of valid languages](https://prismjs.com/#languages-list) on the Prism website.
|
||||
|
||||
## Line Highlighting in Code Blocks
|
||||
## Line Highlighting in Code Blocks <Badge text="default theme"/>
|
||||
|
||||
```` md preview
|
||||
``` js{4}
|
||||
@@ -175,7 +175,7 @@ export default {
|
||||
```
|
||||
````
|
||||
|
||||
## Line Numbers
|
||||
## Line Numbers <Badge text="default theme"/>
|
||||
|
||||
You can enable line numbers for each code blocks via config:
|
||||
|
||||
@@ -209,7 +209,7 @@ export default {
|
||||
```
|
||||
````
|
||||
|
||||
## Import Code Snippets <Badge text="beta" type="warn"/>
|
||||
## Import Code Snippets <Badge text="default theme"/> <Badge text="beta" type="warn"/>
|
||||
|
||||
You can import code snippets from existing files via following syntax:
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ Danger zone, do not proceed
|
||||
|
||||
- [vuepress-plugin-container](https://vuepress.github.io/plugins/container/)
|
||||
|
||||
## 代码块中的语法高亮
|
||||
## 代码块中的语法高亮 <Badge text="默认主题"/>
|
||||
|
||||
VuePress 使用了 [Prism](https://prismjs.com/) 来为 markdown 中的代码块实现语法高亮。Prism 支持大量的编程语言,你需要做的只是在代码块的开始倒勾中附加一个有效的语言别名:
|
||||
|
||||
@@ -159,7 +159,7 @@ export default {
|
||||
|
||||
在 Prism 的网站上查看 [合法的语言列表](https://prismjs.com/#languages-list)。
|
||||
|
||||
## 代码块中的行高亮
|
||||
## 代码块中的行高亮 <Badge text="默认主题"/>
|
||||
|
||||
```` md preview
|
||||
``` js {4}
|
||||
@@ -173,7 +173,7 @@ export default {
|
||||
```
|
||||
````
|
||||
|
||||
## 行号
|
||||
## 行号 <Badge text="默认主题"/>
|
||||
|
||||
你可以通过配置来为每个代码块显示行号:
|
||||
|
||||
@@ -207,7 +207,7 @@ export default {
|
||||
```
|
||||
````
|
||||
|
||||
## 导入代码段 <Badge text="beta" type="warn"/>
|
||||
## 导入代码段 <Badge text="默认主题"/> <Badge text="beta" type="warn"/>
|
||||
|
||||
你可以通过下述的语法导入已经存在的文件中的代码段:
|
||||
|
||||
|
||||
@@ -10097,6 +10097,18 @@ vuepress-plugin-flowchart@^1.4.2:
|
||||
dependencies:
|
||||
flowchart.js "^1.11.3"
|
||||
|
||||
vuepress-plugin-import-code@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/vuepress-plugin-import-code/-/vuepress-plugin-import-code-0.1.0.tgz#b9a144e70999c10e3d1f2b6ca8308efad336ac99"
|
||||
integrity sha512-Fa5fvDdbhRnwyqfGLZ6O2wG0GMq4EHYo92sAX9YFjqj6xbqkE0wc+FuCqLp3QO06Xto2KpqFUarLufHPnNOErA==
|
||||
|
||||
vuepress-plugin-prism@^1.0.0-alpha.0:
|
||||
version "1.0.0-alpha.0"
|
||||
resolved "https://registry.yarnpkg.com/vuepress-plugin-prism/-/vuepress-plugin-prism-1.0.0-alpha.0.tgz#8fb35ebf0821c632c1cdccb91581d07e1d4eb046"
|
||||
integrity sha512-xBexBpDRR14K7zt05ZHRJm43er31Vad+Za09pIm07sYyUSOWIxLM3v44SIxLk7fQi3bPB+0B3nbLCdx92IR3WA==
|
||||
dependencies:
|
||||
prismjs "^1.16.0"
|
||||
|
||||
w3c-hr-time@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045"
|
||||
|
||||
Reference in New Issue
Block a user