💥 支持雙評論系統配置/評論配置整理

 增加mac light 代碼框
 增加文章過期提醒配置
 文章copyright 可單獨配置
 card-category 中category名稱和數字限制一行顯示
 簡繁轉換優化,placeholder文字也會被轉換
🐛 修復配置PWA參數時,如果網站是子目錄時,會出現加載不到文件的bugs
調整當card-category有收縮按鈕時的顯示佈局
This commit is contained in:
Jerry
2020-06-25 23:13:55 +08:00
Unverified
parent 67b49c01ba
commit 4d34208391
47 changed files with 1098 additions and 817 deletions
+2 -2
View File
@@ -10,11 +10,11 @@
const urlFor = require('hexo-util').url_for.bind(hexo)
function lazyProcess (htmlContent) {
var bg = hexo.theme.config.lazyload.post ? urlFor(hexo.theme.config.lazyload.post) : 'data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs='
const bg = hexo.theme.config.lazyload.post ? urlFor(hexo.theme.config.lazyload.post) : 'data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs='
return htmlContent.replace(/(<img .*?src=)/ig, `$1 "${bg}" data-src=`)
}
var processPost = function (data) {
const processPost = function (data) {
if (!hexo.theme.config.lazyload.enable) return
data.content = lazyProcess.call(this, data.content)
return data
+4 -4
View File
@@ -14,10 +14,10 @@ hexo.extend.filter.register('before_post_render', function (data) {
return data
})
var randomCover = function () {
var theme = hexo.theme.config
var cover
var num
function randomCover () {
const theme = hexo.theme.config
let cover
let num
if (theme.cover.default_cover) {
if (!Array.isArray(theme.cover.default_cover)) {