hexo-adsense 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +12458 -416
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +12438 -396
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +12438 -396
- package/dist/index.mjs.map +1 -0
- package/dist/source/adblock.js +1 -1
- package/dist/source/article-ads.js +1 -1
- package/dist/source/article-ads.old.js +1 -1
- package/dist/source/https.js +1 -1
- package/package.json +78 -77
- package/readme.md +16 -0
- package/dist/index.d.cts +0 -2
- package/dist/index.d.mts +0 -2
- package/dist/index.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hexo-adsense",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Hexo adsense support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,23 +21,21 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"lint": "eslint --ext .js,.jsx,.ts,.d.ts,.tsx ./",
|
|
23
23
|
"lint:fix": "eslint --fix --ext .js,.jsx,.ts,.d.ts,.tsx ./",
|
|
24
|
-
"build": "tsc -
|
|
25
|
-
"
|
|
24
|
+
"build-dts": "tsc -p tsconfig.build.json --emitDeclarationOnly --outDir dist",
|
|
25
|
+
"build-tsc": "tsc -b tsconfig.build.json",
|
|
26
|
+
"build": "rollup -c -m && npm run build-dts && gulp",
|
|
27
|
+
"clean": "npx -y rimraf -rf dist tmp && npm run build",
|
|
26
28
|
"update": "npx npm-check-updates -u -x hexo,chalk",
|
|
27
29
|
"patch": "npm version patch",
|
|
28
30
|
"minor": "npm version minor",
|
|
29
31
|
"major": "npm version major",
|
|
30
32
|
"prepare": "husky",
|
|
31
|
-
"prepack": "node package-switch.cjs production",
|
|
32
33
|
"pack": "node packer.cjs --yarn",
|
|
33
34
|
"clone:docs": "git clone https://github.com/dimaslanjaka/docs.git .deploy_git"
|
|
34
35
|
},
|
|
35
36
|
"files": [
|
|
36
37
|
"dist/"
|
|
37
38
|
],
|
|
38
|
-
"workspaces": [
|
|
39
|
-
"test/demo"
|
|
40
|
-
],
|
|
41
39
|
"keywords": [
|
|
42
40
|
"hexo",
|
|
43
41
|
"auto",
|
|
@@ -55,101 +53,104 @@
|
|
|
55
53
|
"dependencies": {
|
|
56
54
|
"ansi-colors": "^4.1.3",
|
|
57
55
|
"bluebird": "^3.7.2",
|
|
58
|
-
"fs-extra": "^11.
|
|
59
|
-
"glob": "^
|
|
60
|
-
"hexo-fs": "^
|
|
61
|
-
"hexo-is": "^2.0.
|
|
56
|
+
"fs-extra": "^11.3.3",
|
|
57
|
+
"glob": "^13.0.3",
|
|
58
|
+
"hexo-fs": "^5.0.1",
|
|
59
|
+
"hexo-is": "^2.0.2",
|
|
62
60
|
"hexo-log": "^4.1.0",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"minimatch": "^10.0.1",
|
|
61
|
+
"jsdom": "^28.0.0",
|
|
62
|
+
"lodash": "^4.17.23",
|
|
63
|
+
"minimatch": "^10.2.0",
|
|
67
64
|
"minimist": "^1.2.8",
|
|
68
65
|
"moment": "^2.30.1",
|
|
69
|
-
"node-html-parser": "^
|
|
66
|
+
"node-html-parser": "^7.0.2",
|
|
70
67
|
"object-assign": "^4.1.1",
|
|
71
|
-
"prettier": "^3.
|
|
72
|
-
"sbg-utility": "^2.0.
|
|
73
|
-
"terser": "^5.
|
|
68
|
+
"prettier": "^3.8.1",
|
|
69
|
+
"sbg-utility": "^2.0.11",
|
|
70
|
+
"terser": "^5.46.0",
|
|
74
71
|
"underscore": "^1.13.7"
|
|
75
72
|
},
|
|
76
73
|
"devDependencies": {
|
|
77
|
-
"@babel/core": "^7.
|
|
78
|
-
"@babel/preset-env": "^7.
|
|
79
|
-
"@babel/preset-typescript": "^7.
|
|
80
|
-
"@eslint/eslintrc": "^3.
|
|
81
|
-
"@eslint/js": "^
|
|
82
|
-
"@rollup/plugin-babel": "^6.0
|
|
83
|
-
"@rollup/plugin-commonjs": "^
|
|
74
|
+
"@babel/core": "^7.29.0",
|
|
75
|
+
"@babel/preset-env": "^7.29.0",
|
|
76
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
77
|
+
"@eslint/eslintrc": "^3.3.3",
|
|
78
|
+
"@eslint/js": "^10.0.1",
|
|
79
|
+
"@rollup/plugin-babel": "^6.1.0",
|
|
80
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
84
81
|
"@rollup/plugin-json": "^6.1.0",
|
|
85
|
-
"@rollup/plugin-node-resolve": "^
|
|
86
|
-
"@rollup/plugin-typescript": "^12.
|
|
82
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
83
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
87
84
|
"@types/babel__core": "^7",
|
|
88
85
|
"@types/babel__preset-env": "^7",
|
|
89
86
|
"@types/bluebird": "^3",
|
|
87
|
+
"@types/connect": "^3.4.38",
|
|
90
88
|
"@types/fs-extra": "^11",
|
|
91
|
-
"@types/gulp": "^4.0.
|
|
89
|
+
"@types/gulp": "^4.0.18",
|
|
92
90
|
"@types/gulp-sourcemaps": "^0.0.38",
|
|
93
|
-
"@types/
|
|
91
|
+
"@types/hexo": "^7.0.0",
|
|
92
|
+
"@types/jsdom": "^27.0.0",
|
|
94
93
|
"@types/lodash": "^4",
|
|
95
94
|
"@types/minimist": "^1",
|
|
96
|
-
"@types/node": "^
|
|
95
|
+
"@types/node": "^25.2.3",
|
|
97
96
|
"@types/object-assign": "^4",
|
|
97
|
+
"@types/through2": "https://github.com/dimaslanjaka/nodejs-package-types/raw/through2/release/types-through2.tgz",
|
|
98
98
|
"@types/underscore": "^1",
|
|
99
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
100
|
-
"@typescript-eslint/parser": "^8.
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"eslint
|
|
105
|
-
"eslint-
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
99
|
+
"@typescript-eslint/eslint-plugin": "^8.55.0",
|
|
100
|
+
"@typescript-eslint/parser": "^8.55.0",
|
|
101
|
+
"binary-collections": "^2.0.10",
|
|
102
|
+
"browserify": "^17.0.1",
|
|
103
|
+
"cross-spawn": "^7.0.6",
|
|
104
|
+
"eslint": "^10.0.0",
|
|
105
|
+
"eslint-config-prettier": "^10.1.8",
|
|
106
|
+
"eslint-plugin-import": "^2.32.0",
|
|
107
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
108
|
+
"git-command-helper": "^2.1.0",
|
|
109
|
+
"globals": "^17.3.0",
|
|
110
|
+
"gulp": "^5.0.1",
|
|
111
|
+
"gulp-autoprefixer": "^10.0.0",
|
|
110
112
|
"gulp-clean-css": "^4.3.0",
|
|
111
113
|
"gulp-html-minifier-terser": "^7.1.0",
|
|
112
114
|
"gulp-sourcemaps": "^3.0.0",
|
|
113
115
|
"gulp-terser": "^2.1.0",
|
|
114
|
-
"hexo": "^7.3.0",
|
|
115
116
|
"hexo-server": "^3.0.0",
|
|
116
|
-
"husky": "^9.1.
|
|
117
|
-
"lint-staged": "^
|
|
118
|
-
"nodemon": "^3.1.
|
|
119
|
-
"rimraf": "^6.
|
|
120
|
-
"rollup": "4.
|
|
121
|
-
"rollup-plugin-dts": "^6.
|
|
117
|
+
"husky": "^9.1.7",
|
|
118
|
+
"lint-staged": "^16.2.7",
|
|
119
|
+
"nodemon": "^3.1.11",
|
|
120
|
+
"rimraf": "^6.1.2",
|
|
121
|
+
"rollup": "4.57.1",
|
|
122
|
+
"rollup-plugin-dts": "^6.3.0",
|
|
123
|
+
"through2": "^4.0.2",
|
|
122
124
|
"ts-node": "^10.9.2",
|
|
123
|
-
"typescript": "^5.
|
|
125
|
+
"typescript": "^5.9.3"
|
|
124
126
|
},
|
|
125
127
|
"packageManager": "yarn@4.5.1",
|
|
126
128
|
"resolutions": {
|
|
127
|
-
"@types/git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/
|
|
128
|
-
"@types/hexo": "https://github.com/dimaslanjaka/hexo/raw/
|
|
129
|
-
"binary-collections": "https://github.com/dimaslanjaka/bin/raw/
|
|
130
|
-
"cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/
|
|
131
|
-
"git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/
|
|
132
|
-
"hexo": "https://github.com/dimaslanjaka/hexo/raw/
|
|
133
|
-
"hexo-
|
|
134
|
-
"hexo-
|
|
135
|
-
"hexo-
|
|
136
|
-
"hexo-
|
|
137
|
-
"hexo-
|
|
138
|
-
"hexo-
|
|
139
|
-
"hexo-
|
|
140
|
-
"hexo-
|
|
141
|
-
"hexo-
|
|
142
|
-
"hexo-
|
|
143
|
-
"hexo-
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"sbg-
|
|
149
|
-
"sbg-
|
|
150
|
-
"sbg-
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"warehouse": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/warehouse.tgz"
|
|
129
|
+
"@types/git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/678044cf286b2bd122e3ee937852a739e804e0a5/release/git-command-helper.tgz",
|
|
130
|
+
"@types/hexo": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo.tgz",
|
|
131
|
+
"binary-collections": "https://github.com/dimaslanjaka/bin/raw/9d2f7ebf4c37cf1d58487951c9e2ad3a20b917c1/releases/bin.tgz",
|
|
132
|
+
"cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/80999ac7a7031a81e11ddb5fab0f8ba433041c98/release/cross-spawn.tgz",
|
|
133
|
+
"git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/678044cf286b2bd122e3ee937852a739e804e0a5/release/git-command-helper.tgz",
|
|
134
|
+
"hexo-asset-link": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-asset-link.tgz",
|
|
135
|
+
"hexo-cli": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-cli.tgz",
|
|
136
|
+
"hexo-front-matter": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-front-matter.tgz",
|
|
137
|
+
"hexo-generator-redirect": "https://github.com/dimaslanjaka/hexo-generator-redirect/raw/a2e390c496954e7883218b9b82a09972c7507c10/release/hexo-generator-redirect.tgz",
|
|
138
|
+
"hexo-is": "https://github.com/dimaslanjaka/hexo-is/raw/52cbd2efd2c134fae5033ea0bf6f3fd8160abd6e/release/hexo-is.tgz",
|
|
139
|
+
"hexo-log": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-log.tgz",
|
|
140
|
+
"hexo-post-parser": "https://github.com/dimaslanjaka/hexo-post-parser/raw/f7b82f38fe28e4d42a504971eadd27e517e26f13/release/hexo-post-parser.tgz",
|
|
141
|
+
"hexo-renderers": "https://github.com/dimaslanjaka/hexo-renderers/raw/b1bcde457c2c60a73f567e00bbf5157b919cec45/release/hexo-renderers.tgz",
|
|
142
|
+
"hexo-seo": "https://github.com/dimaslanjaka/hexo-seo/raw/21e024b84538853c8b8521140530694d92d64b74/release/hexo-seo.tgz",
|
|
143
|
+
"hexo-server": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-server.tgz",
|
|
144
|
+
"hexo-shortcodes": "https://github.com/dimaslanjaka/hexo-shortcodes/raw/2ed1250d701369b8235a02b9af834bbfc62644a0/release/hexo-shortcodes.tgz",
|
|
145
|
+
"hexo-util": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/hexo-util.tgz",
|
|
146
|
+
"instant-indexing": "https://github.com/dimaslanjaka/static-blog-generator/raw/f221d11cdc32fa7dd001e5236f8c3f30387e62d2/packages/instant-indexing/release/instant-indexing.tgz",
|
|
147
|
+
"markdown-it": "https://github.com/dimaslanjaka/markdown-it/raw/7f4f9d5ec08ebcfde42affb517ea7c8e6a305534/release/markdown-it.tgz",
|
|
148
|
+
"nodejs-package-types": "https://github.com/dimaslanjaka/nodejs-package-types/raw/5f18f2e8c4d8230f71f3f327ac14756d7eeae9ce/release/nodejs-package-types.tgz",
|
|
149
|
+
"sbg-api": "https://github.com/dimaslanjaka/static-blog-generator/raw/95400dd87106542a640092fa2073ee7d5c9b83e6/packages/sbg-api/release/sbg-api.tgz",
|
|
150
|
+
"sbg-cli": "https://github.com/dimaslanjaka/static-blog-generator/raw/8c0f903cb1643add882c32d7a2180d2b99e1154f/packages/sbg-cli/release/sbg-cli.tgz",
|
|
151
|
+
"sbg-server": "https://github.com/dimaslanjaka/static-blog-generator/raw/8c0f903cb1643add882c32d7a2180d2b99e1154f/packages/sbg-server/release/sbg-server.tgz",
|
|
152
|
+
"sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/3f36c7384fa414d0207460e00c0d7d362dba995f/packages/sbg-utility/release/sbg-utility.tgz",
|
|
153
|
+
"static-blog-generator": "https://github.com/dimaslanjaka/static-blog-generator/raw/8c0f903cb1643add882c32d7a2180d2b99e1154f/packages/static-blog-generator/release/static-blog-generator.tgz",
|
|
154
|
+
"warehouse": "https://github.com/dimaslanjaka/hexo/raw/b5bd2de2fa426736c835be191c1d2a761673d2a0/releases/warehouse.tgz"
|
|
154
155
|
}
|
|
155
156
|
}
|
package/readme.md
CHANGED
|
@@ -52,7 +52,9 @@ adsense:
|
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
### Article Ads
|
|
55
|
+
|
|
55
56
|
> include to config article_ads
|
|
57
|
+
|
|
56
58
|
```yaml
|
|
57
59
|
adsense:
|
|
58
60
|
article_ads:
|
|
@@ -115,6 +117,20 @@ tags:
|
|
|
115
117
|
- tags2
|
|
116
118
|
```
|
|
117
119
|
|
|
120
|
+
## Prioritize ads fill on spesific element
|
|
121
|
+
|
|
122
|
+
You can adjust where the ads should be visible by using `<div hexo-adsense-fill=""></div>` everywhere. [[Reference](https://github.com/dimaslanjaka/hexo-adsense/blob/27634e629ce3360eac9b31a7724e7d193aaab1f3/source/article-ads.js#L83)]
|
|
123
|
+
|
|
124
|
+
You also can adjust with independent ads (_dont use same adsense ads id_).
|
|
125
|
+
|
|
126
|
+
```html
|
|
127
|
+
<div hexo-adsense-fill="" style="display:block" data-ad-client="ca-pub-1048456668116270" data-ad-slot="5659161378" data-ad-format="auto" data-full-width-responsive="true"></div>
|
|
128
|
+
<!-- or you can remove ad-client and style attribute -->
|
|
129
|
+
<div hexo-adsense-fill="" data-ad-slot="5659161378" data-ad-format="auto" data-full-width-responsive="true"></div>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Above codes will converted into adsense ads automatically.
|
|
133
|
+
|
|
118
134
|
## Footnote
|
|
119
135
|
first development finished on 12 November 2021
|
|
120
136
|
|
package/dist/index.d.cts
DELETED
package/dist/index.d.mts
DELETED
package/dist/index.d.ts
DELETED