Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1.05 KB

README.md

File metadata and controls

38 lines (30 loc) · 1.05 KB

Google Adsense plugin for GitBook

Codacy Badge NPM downloads

Install the plugin with npm:

$ npm install gitbook-plugin-adsense

Add it to the plugins array in book.json:

{
  "plugins": ["adsense"]
}

You can set the Google Adsense client and slot keys using the plugins configuration in the book.json:

{
    "plugins": ["adsense"],
    "pluginsConfig": {
      "adsense": {
        "client": "ca-pub-XXXXXXXXXXXXXXXX",
        "slot": "XXXXXXXXXX",
        "format": "auto",
        "element": ".page-inner section",
        "position": "top"
      }
    }
}

Allowed values for positions are top and bottom, bottom being the default.