vuepress-plugin-google-adsense2

VuePress 2 plugin - google-adsense

Usage no npm install needed!

<script type="module">
  import vuepressPluginGoogleAdsense2 from 'https://cdn.skypack.dev/vuepress-plugin-google-adsense2';
</script>

README

vuepress-plugin-google-adsense2

English | 简体中文

Note: This plugin is provided for VuePress 2

Google adsense plugin for VuePress 2, automatically add Google Ad to your VuePress site.

npm GitHub license

Install

yarn add -D vuepress-plugin-google-adsense2
# OR
npm install -D vuepress-plugin-google-adsense2

Usage

module.exports = {
  plugins: [
    [
      'vuepress-plugin-google-adsense2',
      {
        id: 'ca-pub-xxxxxxx',
      },
    ],
  ],
};

More plugins usage, see also: VuePress Plugins

Options

id

  • Type: string

  • Details:

    In the code block provided to you by AdSense, find the word data-ad-client. The id should start with 'ca-pub-'. You can follow the instructions here to find your AdSense code.

    Or you can use Publisher ID and add the string 'ca-' in front.You can follow the instructions here to find your Publisher ID.