Skip to content

✨Google AdSense plugin for VuePress 2, automatically adds Google Ad to your VuePress site. ✨ VuePress 2 的 Google AdSense 插件, 自动帮你在你的 VuePress 站点上添加谷歌广告

License

Notifications You must be signed in to change notification settings

John60676/vuepress-plugin-google-adsense2

Repository files navigation

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

import googleAdSensePlugin from 'vuepress-plugin-google-adsense2';

module.exports = {
  plugins: [
    googleAdSensePlugin({
      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.

About

✨Google AdSense plugin for VuePress 2, automatically adds Google Ad to your VuePress site. ✨ VuePress 2 的 Google AdSense 插件, 自动帮你在你的 VuePress 站点上添加谷歌广告

Topics

Resources

License

Stars

Watchers

Forks