
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
gitbook-plugin-codegroup
Advanced tools
book.json
{
"plugins": ["codegroup"]
}
then run
$ gitbook install
book.json
"pluginsConfig": {
"codegroup":{
"defaultTabName": "Code",
"tabNameSeperator": "::",
"rememberTabs": true
}
}
| Option | Description |
|---|---|
| defaultTabName {string} default: Code | a fallback tab name if no language is specied for a fenced code block |
| tabNameSeperator {string} default: :: | a string delimeter that differentiates the language name from the tab name |
| rememberTabs {boolean} default: false | determines if the plugin will remember the selected tab, given the info in the codegroup has not changed |
{% codegroup %}
```js::sdk
var s = console.log;
```
```js
var s = console.warn;
```
{% endcodegroup %}
codegroup takes optional named arguments:
rememberTabs (boolean): Overrides value in pluginsConfig.codegroup.rememberTabs.defaultTabName (string): A default tab name to use for the specific code group. Overrides value in pluginsConfig.codegroup.defaultTabNameexample:
{% codegroup rememberTabs=true, defaultTabName="Snippet" %}
```js::nodejs
var s = "sample";
```
```swift
let s: String = "sample";
```
{% endcodegroup %}
As seen in the example above, tabs can have custom names for situations where it is required to group the same language and there is need to differentiate them.
The example above shows a code block js::sdk, where js is the language syntax to be used and sdk denotes the name to be seen in the tab; :: (configurable) is used to separate both terms.
It is also possible to supply a Print Title using a second tabNameSeperator
Examples:
| Example | Description |
|---|---|
Explicit js::sdk::Javascript SDK | When converted to pdf, Javascript SDK will be placed above the code block |
Syntax+Print Only js::::Javascript SDK | It is possible to omit the custom tab name by using a double tabNameSeperator |
TabName+Print Only ::sdk::Javascript SDK | It is possible to omit the syntax name to only define the custom tab name and print title |
Print Only ::::Javascript SDK | It is possible to omit the syntax name and custom tab name by using a double tabNameSeperator |

Pull requests are welcome
FAQs
codegroup plugin for GitBook
The npm package gitbook-plugin-codegroup receives a total of 2 weekly downloads. As such, gitbook-plugin-codegroup popularity was classified as not popular.
We found that gitbook-plugin-codegroup demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.