🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

gitbook-plugin-components-2

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitbook-plugin-components-2

For Gitbook projects: Add html templates to the target selector of your choice. Useful for headers and footers.

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

Gitbook Plugin Components

Adds the ability to use 'components' (basically, html templates).

Install

Add 'components' to the book.json plugins array:

{
  "plugins": ["components"],
}

Then make sure to run install after adding the plugin:

gitbook install

...and then:

gitbook serve

Configuration options

You can see an example config options below for book.json.

This will look for docs/components/header.html and prepend it to body.

Then it will look for docs/components/footer.html and append it to .book.

{
  "pluginsConfig": {
    "components": {
      "templatePath": "docs/components",
      "templates": [
        {
          "name": "header",
          "target": "body",
          "prepend": "true"
        },
        {
          "name": "footer",
          "target": ".book",
          "prepend": "false"
        }
      ]
    }
  }
}

Default values for templatePath is docs/components and default for prepend is true.

FAQs

Package last updated on 23 Aug 2017

Did you know?

Socket

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.

Install

Related posts