1.2.4 • Published 8 years ago
gitbook-plugin-path-params-codetabs v1.2.4
path param codetabs
Include multiple languages code block to your GitBook (for example when documenting an API).

Installation
Adds the plugin to your book.json, then run gitbook install if you are building your book locally.
{
"plugins": ["path-params-codetabs"]
}Highlight Path Parameter
In order to highlight path parameters, change {% codetabs %} to {% pathCodetabs %}, then cover up the parameter with {}.
{% pathCodetabs name="CURL", type="bash" -%}
curl -X POST http://genius.genie.ggg/abc/{userId}/{HelloCount}/hey
{% endcodetabs %}Highlight Path Parameter Example
Using codetabs
This is a code block with tabs for each languages:
{% pathCodetabs name="Python", type="py" -%}
msg = "Hello World"
print msg
{%- language name="JavaScript", type="js" -%}
var msg = "Hello World";
console.log(msg);
{%- endpathCodetabs %}Escaping templating syntax
For languages using syntax like {{, {%; we have to escape these content:
Here is some angular and react code
{% codetabs name="Python", type="py" -%}
{% raw %}
<h1>Hello {{yourName}}!</h1>
{% endraw %}
{%- language name="React", type="js" -%}
var React = require('react')
{%- endcodetabs %}1.2.4
8 years ago
1.2.3
8 years ago
1.2.2
8 years ago
1.2.1
8 years ago
1.2.0
8 years ago
1.1.9
8 years ago
1.1.8
8 years ago
1.1.7
8 years ago
1.1.6
8 years ago
1.1.5
8 years ago
1.1.4
8 years ago
1.1.3
8 years ago
1.1.2
8 years ago
1.1.1
8 years ago
1.1.0
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago