hexo-sitemap-html 1.0.0 → 1.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/.github/workflows/npm-publish.yml +33 -0
- package/index.js +2 -0
- package/package.json +3 -3
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Node.js Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [created]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: 20
|
|
18
|
+
- run: npm ci
|
|
19
|
+
- run: npm test
|
|
20
|
+
|
|
21
|
+
publish-npm:
|
|
22
|
+
needs: build
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: 20
|
|
29
|
+
registry-url: https://registry.npmjs.org/
|
|
30
|
+
- run: npm ci
|
|
31
|
+
- run: npm publish
|
|
32
|
+
env:
|
|
33
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
package/index.js
CHANGED
|
@@ -165,6 +165,8 @@ async function createHtmlSitemap(hexo, force = false) {
|
|
|
165
165
|
|
|
166
166
|
// 插件入口
|
|
167
167
|
module.exports = function(hexo) {
|
|
168
|
+
hexo.log.info('[hexo-sitemap-html] Plugin loaded successfully');
|
|
169
|
+
|
|
168
170
|
// 生成器:hexo g 时自动运行
|
|
169
171
|
hexo.extend.generator.register('html-sitemap', function(locals) {
|
|
170
172
|
return createHtmlSitemap(this);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hexo-sitemap-html",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"sitemap-html",
|
|
15
15
|
"html-sitemap"
|
|
16
16
|
],
|
|
17
|
-
"hexo": {
|
|
17
|
+
"hexo": {
|
|
18
18
|
"version": ">=3.0.0"
|
|
19
19
|
},
|
|
20
20
|
"author": "2winter",
|
|
@@ -38,4 +38,4 @@
|
|
|
38
38
|
"url": "https://github.com/2winter-dev/hexo-sitemap-html/issues"
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://github.com/2winter-dev/hexo-sitemap-html#readme"
|
|
41
|
-
}
|
|
41
|
+
}
|