Skip to content

Commit b8ce22c

Browse files
committed
fix($last-updated): doesn't work due to internal api change
1 parent eaaa25c commit b8ce22c

File tree

1 file changed

+3
-3
lines changed
  • packages/@vuepress/plugin-last-updated

1 file changed

+3
-3
lines changed

packages/@vuepress/plugin-last-updated/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
const spawn = require('cross-spawn')
22

33
module.exports = (options = {}, context) => ({
4-
extendPageData ({ _filePath }) {
4+
extendPageData ($page) {
55
const { transformer } = options
6-
const timestamp = getGitLastUpdatedTimeStamp(_filePath)
6+
const timestamp = getGitLastUpdatedTimeStamp($page._filePath)
77
const lastUpdated = typeof transformer === 'function' ? transformer(timestamp) : timestamp
8-
return { lastUpdated }
8+
$page.lastUpdated = lastUpdated
99
}
1010
})
1111

0 commit comments

Comments
 (0)