Skip to content

Commit 8ffb1ed

Browse files
committed
v1.2.4
1 parent 8f812b2 commit 8ffb1ed

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

docs/.vuepress/config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ module.exports = {
99
['meta', { name: 'keywords', content: '前端博客,个人技术博客,前端,前端开发,前端框架,web前端,前端面试题,技术文档,学习,面试,JavaScript,js,ES6,TypeScript,vue,python,css3,html5,Node,git,github,markdown'}],
1010
['meta', { name: 'baidu-site-verification', content: '7F55weZDDc'}],// 百度统计博主验证
1111
['meta', { name: 'theme-color', content: '#11a8cd'}], // 移动浏览器主题颜色
12-
13-
// 不蒜子访问量统计 (主题暂未使用到)
14-
// ['script', { src: '//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js', async: 'async'}]
15-
12+
// ['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no'}], // 移动端阻止页面缩放
1613
],
1714
markdown: {
1815
lineNumbers: true // 代码行号

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"vuepress-plugin-one-click-copy": "^1.0.2",
2222
"vuepress-plugin-thirdparty-search": "^1.0.2",
2323
"vuepress-plugin-zooming": "^1.1.7",
24-
"vuepress-theme-vdoing": "^1.2.3",
24+
"vuepress-theme-vdoing": "^1.2.4",
2525
"yamljs": "^0.3.0"
2626
},
2727
"dependencies": {

theme-vdoing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuepress-theme-vdoing",
3-
"version": "1.2.3",
3+
"version": "1.2.4",
44
"description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。",
55
"author": {
66
"name": "gaoyi(Evan) Xu"

theme-vdoing/util/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,12 @@ export function zero(d){
266266

267267
// 获取时间的时间戳
268268
export function getTimeNum (post) {
269-
return new Date(post.frontmatter.date || post.lastUpdated).getTime()
269+
let dateStr = post.frontmatter.date || post.lastUpdated
270+
let date = new Date(dateStr)
271+
if (date == "Invalid Date") { // 修复new Date()在Safari下出现Invalid Date的问题
272+
date = new Date(dateStr.replace(/-/g, '/'))
273+
}
274+
return date.getTime()
270275
}
271276

272277
// 比对时间

0 commit comments

Comments
 (0)