hexo-adsense 1.1.1 → 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.
Files changed (192) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/LICENSE +0 -0
  3. package/dist/index.cjs +12799 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.js +12782 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.mjs +12782 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/dist/source/adblock.css +2 -0
  10. package/dist/source/adblock.js +1 -0
  11. package/{lib → dist}/source/article-ads.css +0 -0
  12. package/dist/source/article-ads.js +1 -0
  13. package/dist/source/article-ads.old.js +1 -0
  14. package/{lib → dist}/source/blogger-redirect.html +0 -0
  15. package/dist/source/https.js +1 -0
  16. package/{lib → dist}/source/in_article_ads_test.html +0 -0
  17. package/package.json +122 -38
  18. package/{README.md → readme.md} +27 -8
  19. package/gulpfile.ts +0 -100
  20. package/lib/index.d.ts +0 -1
  21. package/lib/index.js +0 -91
  22. package/lib/packages/hexo-cli-extras/lib/env.d.ts +0 -3
  23. package/lib/packages/hexo-cli-extras/lib/env.js +0 -49
  24. package/lib/packages/hexo-extend-injector2/index.d.ts +0 -2
  25. package/lib/packages/hexo-extend-injector2/index.js +0 -12
  26. package/lib/packages/hexo-extend-injector2/lib/bundle/css-bundle.d.ts +0 -2
  27. package/lib/packages/hexo-extend-injector2/lib/bundle/css-bundle.js +0 -64
  28. package/lib/packages/hexo-extend-injector2/lib/bundle/css-generator.d.ts +0 -2
  29. package/lib/packages/hexo-extend-injector2/lib/bundle/css-generator.js +0 -12
  30. package/lib/packages/hexo-extend-injector2/lib/bundle/handle-data-pre.d.ts +0 -2
  31. package/lib/packages/hexo-extend-injector2/lib/bundle/handle-data-pre.js +0 -28
  32. package/lib/packages/hexo-extend-injector2/lib/bundle/js-bundle.d.ts +0 -2
  33. package/lib/packages/hexo-extend-injector2/lib/bundle/js-bundle.js +0 -32
  34. package/lib/packages/hexo-extend-injector2/lib/bundle/js-generator.d.ts +0 -2
  35. package/lib/packages/hexo-extend-injector2/lib/bundle/js-generator.js +0 -8
  36. package/lib/packages/hexo-extend-injector2/lib/default-config.d.ts +0 -39
  37. package/lib/packages/hexo-extend-injector2/lib/default-config.js +0 -46
  38. package/lib/packages/hexo-extend-injector2/lib/filter.d.ts +0 -2
  39. package/lib/packages/hexo-extend-injector2/lib/filter.js +0 -22
  40. package/lib/packages/hexo-extend-injector2/lib/helper/injector.d.ts +0 -2
  41. package/lib/packages/hexo-extend-injector2/lib/helper/injector.js +0 -5
  42. package/lib/packages/hexo-extend-injector2/lib/helper/next-inject.d.ts +0 -2
  43. package/lib/packages/hexo-extend-injector2/lib/helper/next-inject.js +0 -12
  44. package/lib/packages/hexo-extend-injector2/lib/injector.d.ts +0 -29
  45. package/lib/packages/hexo-extend-injector2/lib/injector.js +0 -125
  46. package/lib/packages/hexo-extend-injector2/lib/load.d.ts +0 -3
  47. package/lib/packages/hexo-extend-injector2/lib/load.js +0 -37
  48. package/lib/packages/hexo-extend-injector2/lib/next-point.d.ts +0 -2
  49. package/lib/packages/hexo-extend-injector2/lib/next-point.js +0 -18
  50. package/lib/packages/hexo-extend-injector2/lib/next.d.ts +0 -2
  51. package/lib/packages/hexo-extend-injector2/lib/next.js +0 -99
  52. package/lib/packages/hexo-extend-injector2/lib/order.d.ts +0 -5
  53. package/lib/packages/hexo-extend-injector2/lib/order.js +0 -8
  54. package/lib/source/adblock.css +0 -2
  55. package/lib/source/adblock.js +0 -1
  56. package/lib/source/article-ads.js +0 -1
  57. package/lib/source/article-ads.old.js +0 -1
  58. package/lib/source/https.js +0 -1
  59. package/lib/src/article-ads.d.ts +0 -20
  60. package/lib/src/article-ads.js +0 -310
  61. package/lib/src/checkLocalHost.d.ts +0 -10
  62. package/lib/src/checkLocalHost.js +0 -37
  63. package/lib/src/config.d.ts +0 -14
  64. package/lib/src/config.js +0 -50
  65. package/lib/src/html-parser.d.ts +0 -8
  66. package/lib/src/html-parser.js +0 -26
  67. package/lib/src/log.d.ts +0 -1
  68. package/lib/src/log.js +0 -11
  69. package/lib/src/logger.d.ts +0 -3
  70. package/lib/src/logger.js +0 -25
  71. package/lib/src/md5.d.ts +0 -7
  72. package/lib/src/md5.js +0 -30
  73. package/lib/src/safestringify.d.ts +0 -2
  74. package/lib/src/safestringify.js +0 -125
  75. package/lib/src/utils.d.ts +0 -31
  76. package/lib/src/utils.js +0 -160
  77. package/lib/src/versionParser.d.ts +0 -27
  78. package/lib/src/versionParser.js +0 -40
  79. package/packages/@types/.gitmodules +0 -8
  80. package/packages/@types/LICENSE +0 -21
  81. package/packages/@types/README.md +0 -27
  82. package/packages/@types/hexo/HexoConfig.d.ts +0 -216
  83. package/packages/@types/hexo/LICENSE +0 -21
  84. package/packages/@types/hexo/README.md +0 -16
  85. package/packages/@types/hexo/index.d.ts +0 -849
  86. package/packages/@types/hexo/package.json +0 -34
  87. package/packages/@types/hexo-bunyan/LICENSE +0 -21
  88. package/packages/@types/hexo-bunyan/README.md +0 -16
  89. package/packages/@types/hexo-bunyan/index.d.ts +0 -9
  90. package/packages/@types/hexo-bunyan/package.json +0 -24
  91. package/packages/@types/hexo-log/LICENSE +0 -21
  92. package/packages/@types/hexo-log/README.md +0 -16
  93. package/packages/@types/hexo-log/index.d.ts +0 -159
  94. package/packages/@types/hexo-log/package.json +0 -28
  95. package/packages/@types/index.js +0 -2
  96. package/packages/@types/package.json +0 -30
  97. package/packages/@types/test/package.json +0 -15
  98. package/packages/@types/test/through2.ts +0 -6
  99. package/packages/@types/tsconfig.json +0 -14
  100. package/packages/@types/typings/index.d.ts +0 -7
  101. package/packages/@types/typings/kill-port.d.ts +0 -3
  102. package/packages/@types/typings/markdown-it-abbr.d.ts +0 -4
  103. package/packages/@types/typings/markdown-it-footnote.d.ts +0 -4
  104. package/packages/@types/typings/markdown-it-image-figures.d.ts +0 -4
  105. package/packages/@types/typings/markdown-it-mark.d.ts +0 -4
  106. package/packages/@types/typings/markdown-it-sub.d.ts +0 -7
  107. package/packages/@types/typings/markdown-it-sup.d.ts +0 -7
  108. package/packages/hexo-cli-extras/.eslintrc +0 -13
  109. package/packages/hexo-cli-extras/LICENSE.md +0 -20
  110. package/packages/hexo-cli-extras/README.md +0 -146
  111. package/packages/hexo-cli-extras/docs/basic.gif +0 -0
  112. package/packages/hexo-cli-extras/docs/gui.gif +0 -0
  113. package/packages/hexo-cli-extras/docs/remove.png +0 -0
  114. package/packages/hexo-cli-extras/docs/rename.png +0 -0
  115. package/packages/hexo-cli-extras/index.js +0 -48
  116. package/packages/hexo-cli-extras/lib/edit.js +0 -209
  117. package/packages/hexo-cli-extras/lib/env.js +0 -52
  118. package/packages/hexo-cli-extras/lib/extensions.js +0 -23
  119. package/packages/hexo-cli-extras/lib/integrate.js +0 -87
  120. package/packages/hexo-cli-extras/lib/isolate.js +0 -179
  121. package/packages/hexo-cli-extras/lib/remove.js +0 -145
  122. package/packages/hexo-cli-extras/lib/rename.js +0 -171
  123. package/packages/hexo-cli-extras/package.json +0 -34
  124. package/packages/hexo-extend-injector2/.eslintrc +0 -4
  125. package/packages/hexo-extend-injector2/.github/workflows/linter.yml +0 -27
  126. package/packages/hexo-extend-injector2/.github/workflows/tester.yml +0 -24
  127. package/packages/hexo-extend-injector2/.vscode/settings.json +0 -10
  128. package/packages/hexo-extend-injector2/LICENSE +0 -165
  129. package/packages/hexo-extend-injector2/README-ZH.md +0 -189
  130. package/packages/hexo-extend-injector2/README.md +0 -191
  131. package/packages/hexo-extend-injector2/USAGE.md +0 -38
  132. package/packages/hexo-extend-injector2/index.js +0 -14
  133. package/packages/hexo-extend-injector2/lib/bundle/css-bundle.js +0 -79
  134. package/packages/hexo-extend-injector2/lib/bundle/css-generator.js +0 -13
  135. package/packages/hexo-extend-injector2/lib/bundle/handle-data-pre.js +0 -29
  136. package/packages/hexo-extend-injector2/lib/bundle/js-bundle.js +0 -42
  137. package/packages/hexo-extend-injector2/lib/bundle/js-generator.js +0 -10
  138. package/packages/hexo-extend-injector2/lib/default-config.js +0 -52
  139. package/packages/hexo-extend-injector2/lib/filter.js +0 -24
  140. package/packages/hexo-extend-injector2/lib/helper/injector.js +0 -6
  141. package/packages/hexo-extend-injector2/lib/helper/next-inject.js +0 -14
  142. package/packages/hexo-extend-injector2/lib/injector.js +0 -128
  143. package/packages/hexo-extend-injector2/lib/load.js +0 -45
  144. package/packages/hexo-extend-injector2/lib/next-point.js +0 -19
  145. package/packages/hexo-extend-injector2/lib/next.js +0 -87
  146. package/packages/hexo-extend-injector2/lib/order.js +0 -9
  147. package/packages/hexo-extend-injector2/package.json +0 -49
  148. package/packages/hexo-extend-injector2/renovate.json +0 -6
  149. package/packages/hexo-extend-injector2/test/.eslintrc +0 -3
  150. package/packages/hexo-extend-injector2/test/index.js +0 -18
  151. package/packages/hexo-extend-injector2/test/lib/bundle/bundle-css.js +0 -86
  152. package/packages/hexo-extend-injector2/test/lib/bundle/bundle-js.js +0 -36
  153. package/packages/hexo-extend-injector2/test/lib/bundle/test.css +0 -3
  154. package/packages/hexo-extend-injector2/test/lib/bundle/test.js +0 -5
  155. package/packages/hexo-extend-injector2/test/lib/helper/injector.js +0 -45
  156. package/packages/hexo-extend-injector2/test/lib/helper/next-inject.js +0 -69
  157. package/packages/hexo-extend-injector2/test/lib/hexo-compatible.js +0 -250
  158. package/packages/hexo-extend-injector2/test/lib/hexo-injector.js +0 -37
  159. package/packages/hexo-extend-injector2/test/lib/injector.js +0 -93
  160. package/packages/memoize/CHANGELOG.md +0 -82
  161. package/packages/memoize/CHANGES +0 -124
  162. package/packages/memoize/LICENSE +0 -15
  163. package/packages/memoize/README.md +0 -503
  164. package/packages/memoize/ext/async.js +0 -154
  165. package/packages/memoize/ext/dispose.js +0 -33
  166. package/packages/memoize/ext/max-age.js +0 -90
  167. package/packages/memoize/ext/max.js +0 -27
  168. package/packages/memoize/ext/promise.js +0 -147
  169. package/packages/memoize/ext/ref-counter.js +0 -48
  170. package/packages/memoize/index.js +0 -34
  171. package/packages/memoize/lib/configure-map.js +0 -182
  172. package/packages/memoize/lib/methods.js +0 -32
  173. package/packages/memoize/lib/registered-extensions.js +0 -1
  174. package/packages/memoize/lib/resolve-length.js +0 -15
  175. package/packages/memoize/lib/resolve-normalize.js +0 -17
  176. package/packages/memoize/lib/resolve-resolve.js +0 -21
  177. package/packages/memoize/lib/weak.js +0 -134
  178. package/packages/memoize/methods-plain.js +0 -3
  179. package/packages/memoize/methods.js +0 -3
  180. package/packages/memoize/normalizers/get-1.js +0 -29
  181. package/packages/memoize/normalizers/get-fixed.js +0 -71
  182. package/packages/memoize/normalizers/get-primitive-fixed.js +0 -16
  183. package/packages/memoize/normalizers/get.js +0 -90
  184. package/packages/memoize/normalizers/primitive.js +0 -9
  185. package/packages/memoize/package.json +0 -60
  186. package/packages/memoize/plain.js +0 -37
  187. package/packages/memoize/profile.js +0 -107
  188. package/packages/memoize/repository.md +0 -1
  189. package/packages/memoize/weak-plain.js +0 -3
  190. package/packages/memoize/weak.js +0 -3
  191. package/tsconfig.json +0 -39
  192. package/unused.md +0 -11
@@ -1,31 +0,0 @@
1
- /**
2
- * Memorize cache
3
- *
4
- * @param {any} fn
5
- * @see {@link https://www.freecodecamp.org/news/understanding-memoize-in-javascript-51d07d19430e/}
6
- * @returns {typeof import('underscore').memoize}
7
- */
8
- export function memoize(fn: any, debug: any): typeof import('underscore').memoize;
9
- /**
10
- * Dump large objects
11
- * @param {string} filename
12
- * @param {any} obj
13
- */
14
- export function dump(filename: string, ...obj: any): any;
15
- /**
16
- *
17
- * @param {string} path0
18
- * @param {string[]|string} exclude
19
- * @param {Hexo} hexo
20
- * @returns
21
- */
22
- export function isIgnore(path0: string, exclude: string[] | string, hexo: Hexo): boolean;
23
- declare function randomInt(min: any, max: any): number;
24
- export function streamToString(stream: any): Promise<any>;
25
- export function isFileChanged(filePath: any): globalThis.Promise<boolean>;
26
- export function getFileCache(filePath: any, defaultData: any): any;
27
- export function setFileCache(filePath: any, newData: any): void;
28
- export function setHexo(inHexo: any): void;
29
- import Hexo = require("hexo");
30
- import Promise = require("bluebird");
31
- export { randomInt as randInt };
package/lib/src/utils.js DELETED
@@ -1,160 +0,0 @@
1
- /* eslint-disable no-global-assign */
2
- /* global hexo */
3
- "use strict";
4
- var minimatch = require("minimatch");
5
- var Promise = require("bluebird");
6
- var md5File = require("md5-file");
7
- var underscore = require("underscore");
8
- var Hexo = require("hexo");
9
- var md5Cache = {};
10
- var fileCache = {};
11
- var log = require("./log");
12
- var path = require("path");
13
- var util = require("util");
14
- var fs = require("fs");
15
- var rimraf = require("rimraf");
16
- if (typeof hexo == "undefined") {
17
- /**
18
- * @type {Hexo}
19
- */
20
- var hexo_1;
21
- }
22
- function setHexo(inHexo) {
23
- hexo = inHexo;
24
- }
25
- /**
26
- *
27
- * @param {string} path0
28
- * @param {string[]|string} exclude
29
- * @param {Hexo} hexo
30
- * @returns
31
- */
32
- var isIgnore = function (path0, exclude, hexo) {
33
- if (exclude && !Array.isArray(exclude))
34
- exclude = [exclude];
35
- if (path0 && exclude && exclude.length) {
36
- for (var i = 0, len = exclude.length; i < len; i++) {
37
- var excludePattern = exclude[i];
38
- if (hexo) {
39
- var fromBase = path.join(hexo.base_dir, excludePattern);
40
- var fromSource = path.join(hexo.source_dir, excludePattern);
41
- //log.log([path0, fromBase, fromSource, excludePattern]);
42
- if (minimatch(path0, fromSource))
43
- return true;
44
- if (minimatch(path0, fromBase))
45
- return true;
46
- }
47
- if (minimatch(path0, excludePattern))
48
- return true;
49
- }
50
- }
51
- return false;
52
- };
53
- function streamToString(stream) {
54
- return new Promise(function (resolve, reject) {
55
- var chunks = [];
56
- stream.on("data", function (chunk) {
57
- chunks.push(chunk.toString());
58
- });
59
- stream.on("end", function () {
60
- resolve(chunks.join(""));
61
- });
62
- });
63
- }
64
- function isFileChanged(filePath) {
65
- return md5File(filePath)
66
- .then(function (hash1) {
67
- var hash = md5Cache[filePath];
68
- md5Cache[filePath] = hash1;
69
- if (!hash) {
70
- return true;
71
- }
72
- if (hash === hash1) {
73
- return false;
74
- }
75
- return true;
76
- })["catch"](function (err) {
77
- return true;
78
- });
79
- }
80
- function getFileCache(filePath, defaultData) {
81
- var cache = fileCache[filePath] || defaultData;
82
- return cache;
83
- }
84
- function setFileCache(filePath, newData) {
85
- fileCache[filePath] = newData;
86
- }
87
- function randomInt(min, max) {
88
- if (!min)
89
- min = 0;
90
- if (!max)
91
- throw "max range number required";
92
- // min and max included
93
- return Math.floor(Math.random() * (max - min + 1) + min);
94
- }
95
- /**
96
- * Memorize cache
97
- *
98
- * @param {any} fn
99
- * @see {@link https://www.freecodecamp.org/news/understanding-memoize-in-javascript-51d07d19430e/}
100
- * @returns {typeof import('underscore').memoize}
101
- */
102
- var memoize = function (fn, debug) {
103
- var cache = {};
104
- return function () {
105
- var args = [];
106
- for (var _i = 0; _i < arguments.length; _i++) {
107
- args[_i] = arguments[_i];
108
- }
109
- var n = args[0];
110
- if (n in cache) {
111
- if (debug)
112
- console.log("Fetching from cache", n);
113
- //console.log(cache);
114
- return cache[n];
115
- }
116
- else {
117
- if (debug)
118
- console.log("Calculating result", n);
119
- var result = fn(n);
120
- cache[n] = result;
121
- return result;
122
- }
123
- };
124
- };
125
- var isFirst = true;
126
- /**
127
- * Dump large objects
128
- * @param {string} filename
129
- * @param {any} obj
130
- */
131
- function dump(filename) {
132
- var obj = [];
133
- for (var _i = 1; _i < arguments.length; _i++) {
134
- obj[_i - 1] = arguments[_i];
135
- }
136
- var loc = path.join(__dirname, "../tmp", filename);
137
- if (!fs.existsSync(path.dirname(loc))) {
138
- fs.mkdirSync(path.dirname(loc));
139
- }
140
- else if (isFirst) {
141
- isFirst = false;
142
- rimraf(loc, function (err) {
143
- console.log(loc, "deleted", err ? "fail" : "success");
144
- });
145
- return dump(filename, obj);
146
- }
147
- fs.writeFileSync(loc, util.inspect(obj));
148
- console.log("dump results saved to ".concat(loc));
149
- }
150
- module.exports = {
151
- memoize: memoize,
152
- dump: dump,
153
- isIgnore: isIgnore,
154
- randInt: randomInt,
155
- streamToString: streamToString,
156
- isFileChanged: isFileChanged,
157
- getFileCache: getFileCache,
158
- setFileCache: setFileCache,
159
- setHexo: setHexo
160
- };
@@ -1,27 +0,0 @@
1
- export = versionParser;
2
- /**
3
- * Version Parser
4
- */
5
- declare class versionParser {
6
- /**
7
- * Version Parser Constructor
8
- * @param {string} str
9
- */
10
- constructor(str: string);
11
- result: {
12
- major: number;
13
- minor: number;
14
- build: number;
15
- };
16
- /**
17
- * Parse Version String
18
- * @param {string} str
19
- * @returns
20
- */
21
- parseVersion(str: string): {
22
- major: number;
23
- minor: number;
24
- build: number;
25
- };
26
- toString(): string;
27
- }
@@ -1,40 +0,0 @@
1
- /**
2
- * Version Parser
3
- */
4
- var versionParser = /** @class */ (function () {
5
- /**
6
- * Version Parser Constructor
7
- * @param {string} str
8
- */
9
- function versionParser(str) {
10
- this.result = {
11
- major: 0,
12
- minor: 0,
13
- build: 0
14
- };
15
- if (typeof str == "string")
16
- this.parseVersion(str);
17
- }
18
- /**
19
- * Parse Version String
20
- * @param {string} str
21
- * @returns
22
- */
23
- versionParser.prototype.parseVersion = function (str) {
24
- if (typeof str != "string") {
25
- //return false;
26
- throw "argument required string, found " + typeof str;
27
- }
28
- var arr = str.split(".");
29
- // parse int or default to 0
30
- this.result.major = parseInt(arr[0]) || 0;
31
- this.result.minor = parseInt(arr[1]) || 0;
32
- this.result.build = parseInt(arr[2]) || 0;
33
- return this.result;
34
- };
35
- versionParser.prototype.toString = function () {
36
- return "".concat(this.result.major, ".").concat(this.result.minor, ".").concat(this.result.build);
37
- };
38
- return versionParser;
39
- }());
40
- module.exports = versionParser;
@@ -1,8 +0,0 @@
1
- [submodule "through2"]
2
- path = through2
3
- url = https://github.com/dimaslanjaka/nodejs-package-types.git
4
- branch = through2
5
- [submodule "skeljs"]
6
- path = skeljs
7
- url = https://github.com/dimaslanjaka/nodejs-package-types.git
8
- branch = skeljs
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Dimas Lanjaka
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,27 +0,0 @@
1
- # nodejs-package-types
2
- Customized Package Types
3
- - @types/through2
4
- - @types/kill-port
5
- - @types/markdown-it-abbr
6
- - @types/markdown-it-footnote
7
- - @types/markdown-it-image-figures
8
- - @types/markdown-it-mark
9
- - @types/markdown-it-sub
10
- - @types/markdown-it-sup
11
-
12
- Installation
13
- ```bash
14
- yarn add https://github.com/dimaslanjaka/nodejs-package-types.git --dev
15
- # or
16
- npm i https://github.com/dimaslanjaka/nodejs-package-types.git -D
17
- ```
18
-
19
- or you can visit [GitPkg](https://gitpkg.vercel.app/) and insert which branch or subfolder you want to install
20
-
21
- Development
22
- ```shell
23
- git submodule add https://github.com/dimaslanjaka/nodejs-package-types.git packages/@types
24
- npm i -D ./packages/@types/hexo
25
- npm i -D ./packages/@types/hexo-bunyan
26
- npm i -D ./packages/@types/hexo-log
27
- ```
@@ -1,216 +0,0 @@
1
- import Hexo from "./index";
2
-
3
- interface HexoConfig {
4
- [key: string]: any;
5
- /**
6
- * The title of your website
7
- */
8
- readonly title: string;
9
-
10
- /**
11
- * The subtitle of your website
12
- */
13
- readonly subtitle: string;
14
-
15
- /**
16
- * The description of your website
17
- */
18
- readonly description: string;
19
-
20
- /*
21
- * Your name
22
- */
23
- readonly author: string;
24
-
25
- /**
26
- * The language of your website. Use a 2-lettter ISO-639-1 code. Default is en.
27
- */
28
- readonly language: string | string[];
29
-
30
- /**
31
- * The timezone of your website. Hexo uses the setting on your computer by default.
32
- * You can find the list of available timezones [here]{@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones} .
33
- * Some examples are `America/New_York` , `Japan` , and `UTC` .
34
- */
35
- readonly timezone: string;
36
-
37
- /*
38
- * The URL of your website
39
- */
40
- readonly url: string;
41
-
42
- /**
43
- * The root directory of your website
44
- */
45
- readonly root: string;
46
-
47
- /**
48
- * The permalink format of articles
49
- */
50
- readonly permalink: string;
51
-
52
- /**
53
- * Default values of each segment in permalink
54
- */
55
- readonly permalink_defaults: string | null;
56
-
57
- /**
58
- * Source folder. Where your content is stored
59
- */
60
- readonly source_dir: string;
61
-
62
- /**
63
- * Public folder. Where the static site will be generated
64
- */
65
- readonly public_dir: string;
66
-
67
- /**
68
- * Tag directory
69
- */
70
- readonly tag_dir: string;
71
-
72
- /**
73
- * Archive directory
74
- */
75
- readonly archive_dir: string;
76
-
77
- /**
78
- * Category directory
79
- */
80
- readonly category_dir: string;
81
-
82
- /**
83
- * Include code directory (subdirectory of source_dir)
84
- */
85
- readonly code_dir: string;
86
-
87
- /**
88
- * i18n directory
89
- */
90
- readonly i18n_dir: string;
91
-
92
- /**
93
- * Paths that will be copied to public raw, without being rendered. You can use glob expressions for path matching.
94
- */
95
- readonly skip_render: string | string[] | null;
96
-
97
- /**
98
- * The filename format for new posts
99
- */
100
- readonly new_post_name: string;
101
-
102
- /**
103
- * Default layout
104
- */
105
- readonly default_layout: string;
106
-
107
- /**
108
- * Transform titles into title case?
109
- */
110
- readonly titlecase: boolean;
111
-
112
- /**
113
- * Open external links in a new tab?
114
- */
115
- readonly external_link: boolean;
116
-
117
- /**
118
- * Transform filenames to 1 lower case; 2 upper case
119
- */
120
- readonly filename_case: number;
121
-
122
- /**
123
- * Display drafts?
124
- */
125
- readonly render_drafts: boolean;
126
-
127
- /**
128
- * Enable the Asset Folder?
129
- */
130
- readonly post_asset_folder: boolean;
131
-
132
- /**
133
- * Make links relative to the root folder?
134
- */
135
- readonly relative_link: boolean;
136
-
137
- /**
138
- * Display future posts?
139
- */
140
- readonly future: boolean;
141
-
142
- /**
143
- * Code block settings
144
- */
145
- readonly highlight: {
146
- readonly enable: boolean;
147
- readonly line_number: boolean;
148
- readonly auto_detect: boolean;
149
- readonly tab_replace: string | null;
150
- };
151
-
152
- /**
153
- * Default category
154
- */
155
- readonly default_category: string;
156
-
157
- /**
158
- * Category slugs
159
- */
160
- readonly category_map: { [key: string]: string | number };
161
-
162
- /**
163
- * Tag slugs
164
- */
165
- readonly tag_map: { [key: string]: string | number };
166
-
167
- /**
168
- * Date format
169
- * https://momentjs.com/
170
- */
171
- readonly date_format: string;
172
-
173
- /**
174
- * Time format
175
- * https://momentjs.com/
176
- */
177
- readonly time_format: string;
178
-
179
- /**
180
- * The amount of posts displayed on a single page. 0 disables pagination
181
- */
182
- readonly per_page: number;
183
-
184
- /**
185
- * Pagination directory
186
- */
187
- readonly pagination_dir: string;
188
-
189
- /**
190
- * Theme name. false disables theming
191
- */
192
- readonly theme: string | false;
193
-
194
- /**
195
- * Theme configuration. Include any custom theme settings under this key to override theme defaults.
196
- */
197
- readonly theme_config: { [key: string]: string | number };
198
-
199
- /**
200
- * Deployment settings
201
- */
202
- readonly deploy: Hexo.extend.Deployer.Config | Hexo.extend.Deployer.Config | null;
203
-
204
- /**
205
- * Hexo by default ignores hidden files and folders, but setting this field will make Hexo process them
206
- */
207
- readonly include?: string[] | undefined;
208
-
209
- /**
210
- * Hexo process will ignore files list under this field
211
- */
212
- readonly exclude?: string[] | undefined;
213
- readonly ignore: string[];
214
- }
215
-
216
- export = HexoConfig;
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE
@@ -1,16 +0,0 @@
1
- # Installation
2
- > `npm install --save @types/hexo`
3
-
4
- # Summary
5
- This package contains type definitions for hexo (https://hexo.io/).
6
-
7
- # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hexo.
9
-
10
- ### Additional Details
11
- * Last updated: Sat, 14 Aug 2021 23:01:21 GMT
12
- * Dependencies: [@types/moment](https://npmjs.com/package/@types/moment), [@types/minimist](https://npmjs.com/package/@types/minimist), [@types/bunyan](https://npmjs.com/package/@types/bunyan), [@types/underscore](https://npmjs.com/package/@types/underscore), [@types/connect](https://npmjs.com/package/@types/connect), [@types/hexo-util](https://npmjs.com/package/@types/hexo-util), [@types/bluebird](https://npmjs.com/package/@types/bluebird)
13
- * Global values: none
14
-
15
- # Credits
16
- These definitions were written by [KentarouTakeda](https://github.com/kentarouTakeda).