-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
7zMonkey
committed
Apr 16, 2023
1 parent
b353368
commit 9ab839d
Showing
5 changed files
with
59 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
hexo.extend.filter.register('after_post_render', require('./lib/index')); | ||
(function () { | ||
const setOptions = require('./lib/utils/options') | ||
|
||
hexo.config.auto_associations = setOptions(hexo.config.auto_associations); | ||
let { auto_associations } = hexo.config; | ||
|
||
const { enable, is_clear_cache, priority } = auto_associations; | ||
|
||
|
||
if (!enable) { | ||
console.log("[hexo-auto-association]: Not enabled, skip.") | ||
return | ||
} | ||
|
||
hexo.extend.filter.register('after_post_render', require('./lib/index'), priority); | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
{ | ||
"name": "hexo-auto-association", | ||
"version": "0.0.1", | ||
"description": "", | ||
"version": "1.0.0", | ||
"description": "A tool for internally associating the static pages generated by hexo. In the after_post_render stage, it will judge the specified content under the front-matter of the article (the default is the association option) for association.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC" | ||
"homepage": "https://github.com/7zMonkey/hexo-auto-association", | ||
"bugs": { | ||
"url": "https://github.com/7zMonkey/hexo-auto-association/issues", | ||
}, | ||
"keywords": ["hexo", "plugin", "auto", "association"], | ||
"author": { | ||
"name": "7zMonkey", | ||
"url" : "https://www.7zmonkey.tech/" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/7zMonkey/hexo-auto-association" | ||
}, | ||
"license": "MIT" | ||
} |