gitbook-plugin-http-verb

0.0.12 • Public • Published

GitBook Http Verb Plugin

npm version Build Status

Add Plugin

book.json

{
    "plugins": ["http-verb"]
}

then run

$ gitbook install

Configure (Optional Step)

book.json

"pluginsConfig": {
    "http-verb":{
        "styles": {
            "get": {
                "background": "#fff"
            }
        },
    }
}

Config Options:

Option Description
styles {object}
default: null
an object map of styles for each http verb. see example above on how to define.

Template


{% httpverb %} /api/users/`id` {% endhttpverb %}

Args

httpverb takes an optional named/unnamed argument:

  • verb (string): the http verb to display . eg. get, put and other http verbs. Default: get

examples:


{% httpverb "post" %} /api/users/`id` {% endhttpverb %}
{% httpverb verb="patch" %} /api/users/`id` {% endhttpverb %}

Sample output

output

Pull requests are welcome

Package Sidebar

Install

npm i gitbook-plugin-http-verb

Weekly Downloads

0

Version

0.0.12

License

Apache-2.0

Unpacked Size

4.99 kB

Total Files

5

Last publish

Collaborators

  • lwhiteley