{"id":17857141,"url":"https://github.com/john60676/vuepress-plugin-google-adsense2","last_synced_at":"2025-03-20T14:31:05.012Z","repository":{"id":44783010,"uuid":"330931115","full_name":"John60676/vuepress-plugin-google-adsense2","owner":"John60676","description":"✨Google AdSense plugin for VuePress 2, automatically adds Google Ad to your VuePress site. ✨ VuePress 2 的 Google AdSense 插件, 自动帮你在你的 VuePress 站点上添加谷歌广告","archived":false,"fork":false,"pushed_at":"2023-10-16T07:11:40.000Z","size":32,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T00:23:04.948Z","etag":null,"topics":["google","google-ads","google-adsense","vuepress","vuepress-plugin","vuepress2","vuepress2-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/John60676.png","metadata":{"files":{"readme":"README-zh_CN.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-19T09:42:19.000Z","updated_at":"2024-10-26T07:59:34.000Z","dependencies_parsed_at":"2024-10-28T03:26:57.105Z","dependency_job_id":"694b28be-3841-4fe7-a1c2-17432b8e42fe","html_url":"https://github.com/John60676/vuepress-plugin-google-adsense2","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.5,"last_synced_commit":"2be1c4327b523aa145d8156d899833dc5702b206"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/John60676%2Fvuepress-plugin-google-adsense2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/John60676%2Fvuepress-plugin-google-adsense2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/John60676%2Fvuepress-plugin-google-adsense2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/John60676%2Fvuepress-plugin-google-adsense2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/John60676","download_url":"https://codeload.github.com/John60676/vuepress-plugin-google-adsense2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244075615,"owners_count":20393979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google","google-ads","google-adsense","vuepress","vuepress-plugin","vuepress2","vuepress2-plugin"],"created_at":"2024-10-28T03:11:29.403Z","updated_at":"2025-03-20T14:31:04.750Z","avatar_url":"https://github.com/John60676.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vuepress-plugin-google-adsense2\n\n[English](./README.md) | 简体中文\n\n\u003e 注意: 这个插件是提供给 **VuePress 2** 版本的\n\nVuePress 2 的 [Google adsense](https://www.google.com/adsense) 插件, 自动帮你在你的 VuePress 站点上添加[谷歌广告](https://support.google.com/adsense/answer/9261306)。\n\n[![npm](https://img.shields.io/npm/v/vuepress-plugin-google-adsense2.svg)](https://www.npmjs.com/package/vuepress-plugin-google-adsense2) [![GitHub license](https://img.shields.io/github/license/John60676/vuepress-plugin-google-adsense2.svg)](https://github.com/John60676/vuepress-plugin-google-adsense2/blob/master/LICENSE)\n\n## 安装\n\n```sh\nyarn add -D vuepress-plugin-google-adsense2\n# 或者\nnpm install -D vuepress-plugin-google-adsense2\n```\n\n## 用法\n\n```js\nimport googleAdSensePlugin from 'vuepress-plugin-google-adsense2';\n\nmodule.exports = {\n  plugins: [\n    googleAdSensePlugin({\n      id: 'ca-pub-xxxxxxx',\n    }),\n  ],\n};\n```\n\n更多插件的使用方式，请参考 [VuePress Plugins](https://vuepress2.netlify.app/reference/plugin-api.html#plugins)\n\n## 选项\n\n### id\n\n- 类型: `string`\n\n- 详情:\n\n  在 AdSense 提供给你的代码块中，找到 `'data-ad-client'` 一词。 `id` 应该以`'ca-pub-'`开头。 你可以按照[此处](https://support.google.com/adsense/answer/7584263?hl=zh_CN)的说明查找 AdSense 代码。\n\n  亦或者你可以使用 **发布商 ID** 并在前面加上 `'ca-'` 字符串，来组合成 `id`。你可以按照[此处](https://support.google.com/adsense/answer/105516?hl=zh-hans)的说明查找 AdSense **发布商 ID**。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohn60676%2Fvuepress-plugin-google-adsense2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohn60676%2Fvuepress-plugin-google-adsense2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohn60676%2Fvuepress-plugin-google-adsense2/lists"}