Socket
Socket
Sign inDemoInstall

gitbook-plugin-google-adsense

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gitbook-plugin-google-adsense

Inject Google Adsense to your Gitbook.


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
14.8 kB
Created
Weekly downloads
 

Readme

Source

The Google Adsense plugin for Gitbook

Config plugin in book.json.

{
  "plugins": ["google-adsense"]
}

Install via npm

$ npm install gitbook-plugin-google-adsense

Usage

Need to config an array of ad's properties:

Add an array of ads with following properties:

  • client(require): your Adsense Client ID.
  • slot(require): your Adsense Slot ID.
  • location(require): the DOM selector to element you want to inject ad into.
  • format(optional): your ad format.
  • style(optional): add some inline styles for the ad.

For example,

{
    "plugins": ["adsense"],
    "pluginsConfig": {
        "ads": [
            {
            "client": "ca-pub-XXXXXXXXXXXXXXXX",
            "slot": "XXXXXXXXXX",
            "format": "auto",
            "location": ".page-inner section",
            "style": "width: 100px;"
            }
        ]
    }
}

Keywords

FAQs

Last updated on 05 Nov 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc