-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
status: core team reviewPriority issues for the core team to reviewPriority issues for the core team to reviewtype: feature requestRequest to add a new featureRequest to add a new feature
Description
Feature request
What problem does this feature solve?
Provide reasonable default value for template variable such as year, month, day
What does the proposed API look like?
null
How should this be implemented in your opinion?
like what @vuepres/plugin-last-updated did
if DATE_RE
not match the date in filename,dirname
, and frontmatter.date
is not provided, we can find the commit where this file was first added( i'm not sure if it will course performance problem in large repo)
addedTimeStamp =
parseInt(
spawn
.sync(
'git',
[
'log',
'--follow', // continue listening the history of renamed file
'--diff-filter=A',
'--format=%at',
path.basename(filePath)
],
{
cwd: path.dirname(filePath)
}
)
.stdout.toString('utf-8')
) * 1000
I wrote my own plugin to set frontmatter.date
. It's cool if offical can provide this feature(maybe not necessary).
Are you willing to work on this yourself?
Metadata
Metadata
Assignees
Labels
status: core team reviewPriority issues for the core team to reviewPriority issues for the core team to reviewtype: feature requestRequest to add a new featureRequest to add a new feature