We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eaaa25c commit b8ce22cCopy full SHA for b8ce22c
packages/@vuepress/plugin-last-updated/index.js
@@ -1,11 +1,11 @@
1
const spawn = require('cross-spawn')
2
3
module.exports = (options = {}, context) => ({
4
- extendPageData ({ _filePath }) {
+ extendPageData ($page) {
5
const { transformer } = options
6
- const timestamp = getGitLastUpdatedTimeStamp(_filePath)
+ const timestamp = getGitLastUpdatedTimeStamp($page._filePath)
7
const lastUpdated = typeof transformer === 'function' ? transformer(timestamp) : timestamp
8
- return { lastUpdated }
+ $page.lastUpdated = lastUpdated
9
}
10
})
11
0 commit comments