字数统计
This commit is contained in:
parent
9e44b10581
commit
abc26411b6
74
package-lock.json
generated
74
package-lock.json
generated
@ -1164,6 +1164,11 @@
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
|
||||
},
|
||||
"he": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
|
||||
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0="
|
||||
},
|
||||
"hexo": {
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/hexo/-/hexo-3.7.1.tgz",
|
||||
@ -1636,6 +1641,16 @@
|
||||
"striptags": "2.2.1"
|
||||
}
|
||||
},
|
||||
"hexo-wordcount": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hexo-wordcount/-/hexo-wordcount-3.0.2.tgz",
|
||||
"integrity": "sha512-/T8pWaJyGjVO66nFDK2WyhSuv9xzMMohXlyqqg3HWCv5mYLG6cdzGcn5TNOgKWUAqRLcNF/96036utrTFW/Xrw==",
|
||||
"requires": {
|
||||
"html-to-text": "2.1.3",
|
||||
"numeral": "1.5.6",
|
||||
"wordcount": "1.1.1"
|
||||
}
|
||||
},
|
||||
"highlight.js": {
|
||||
"version": "9.12.0",
|
||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.12.0.tgz",
|
||||
@ -1646,6 +1661,39 @@
|
||||
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz",
|
||||
"integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8="
|
||||
},
|
||||
"html-to-text": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-2.1.3.tgz",
|
||||
"integrity": "sha1-5Q2+TkB5kS2+3N4F0ng4jtuO6pE=",
|
||||
"requires": {
|
||||
"he": "1.1.1",
|
||||
"htmlparser": "1.7.7",
|
||||
"optimist": "0.6.1",
|
||||
"underscore": "1.9.1",
|
||||
"underscore.string": "3.3.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"underscore": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz",
|
||||
"integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg=="
|
||||
},
|
||||
"underscore.string": {
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz",
|
||||
"integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=",
|
||||
"requires": {
|
||||
"sprintf-js": "1.0.3",
|
||||
"util-deprecate": "1.0.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"htmlparser": {
|
||||
"version": "1.7.7",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser/-/htmlparser-1.7.7.tgz",
|
||||
"integrity": "sha1-GeezmX/2+6yZrlp9J2ZInv5+LQ4="
|
||||
},
|
||||
"htmlparser2": {
|
||||
"version": "3.9.2",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz",
|
||||
@ -1964,6 +2012,14 @@
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz",
|
||||
"integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg=="
|
||||
},
|
||||
"match-words": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/match-words/-/match-words-0.1.1.tgz",
|
||||
"integrity": "sha1-3NMRnnSmpnvkMEylz5JlgOjhp68=",
|
||||
"requires": {
|
||||
"word-regex": "0.1.2"
|
||||
}
|
||||
},
|
||||
"micromatch": {
|
||||
"version": "2.3.11",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
|
||||
@ -2138,6 +2194,11 @@
|
||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
|
||||
},
|
||||
"numeral": {
|
||||
"version": "1.5.6",
|
||||
"resolved": "https://registry.npmjs.org/numeral/-/numeral-1.5.6.tgz",
|
||||
"integrity": "sha1-ODHbloRRuc9q/5v5WSXx7443sz8="
|
||||
},
|
||||
"nunjucks": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.1.2.tgz",
|
||||
@ -2708,6 +2769,19 @@
|
||||
"resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
|
||||
"integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0="
|
||||
},
|
||||
"word-regex": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/word-regex/-/word-regex-0.1.2.tgz",
|
||||
"integrity": "sha1-o7x/LSIs5Kk8JGw+9pRY9h9RFjk="
|
||||
},
|
||||
"wordcount": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/wordcount/-/wordcount-1.1.1.tgz",
|
||||
"integrity": "sha1-5y2ngzkE2HChVMnvR+1fPnmXz1c=",
|
||||
"requires": {
|
||||
"match-words": "0.1.1"
|
||||
}
|
||||
},
|
||||
"wordwrap": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
|
||||
|
||||
@ -18,7 +18,8 @@
|
||||
"hexo-renderer-ejs": "^0.3.0",
|
||||
"hexo-renderer-marked": "^0.3.0",
|
||||
"hexo-renderer-stylus": "^0.3.1",
|
||||
"hexo-server": "^0.2.0"
|
||||
"hexo-server": "^0.2.0",
|
||||
"hexo-wordcount": "^3.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"hexo-deployer-git": "^0.3.1"
|
||||
|
||||
@ -12,6 +12,10 @@
|
||||
<% if (post.excerpt && index){ %>
|
||||
<%- post.excerpt %>
|
||||
<% } else { %>
|
||||
<div class="post-count">
|
||||
<div>总字数<span><%= wordcount(post.content) %></span></div>
|
||||
<div>预计阅读<span><%= min2read(post.content) %></span>分钟</div>
|
||||
</div>
|
||||
<%- post.content %>
|
||||
<% } %>
|
||||
|
||||
|
||||
2
themes/yilia/source-src/lib/Valine.min.js
vendored
2
themes/yilia/source-src/lib/Valine.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user