1.0.12 • Published 11 months ago

gitbook-plugin-gbook-codetab v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

gitbook-plugin-gbook-code-tab

thanks for gitbook-plugin-prism-codetab-fox

demo

{% codetab %}

```js {group: "g1", title: "helloworld"}
console.log('hi')
console.log('hi-----')


console.log("good job")

console.log(1+2)
```

```js {group: "g1"}
console.log('+++++')
```

```go
fmt.Println("hi go")
```

```py {title: 'job py'}
print('xxxxx')
```

@import "testcode/11.ts" {group: 'g2'}
@import "testcode/1.ts" {group: 'g2'}

@import "testcode/1.py" {lang: 'go', title: 'not go is python'}

@import "testcode/1.html" {dbe: true}

{% endcodetab %}

说明:

  • lang: 指定语言类型
  • title: 给定tab标题,无则默认为对应语言类型
  • group: 分组,可将同一分组合并到一格tab中
  • dbe: 双大括号编码是否开启,默认false, 开启此项,代码内容 {{ }} 将会加上转义,防止 gitbook 引擎将其内容解析为空,如果手写代码块需自己对内容加上转义
  • 使用 @import 需要引入 gbook-import-code

use in book.json

{
  "plugins": ["gbook-codetab"]
}
1.0.12

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago