mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 21:34:06 -06:00
fix(transformer): use path.relative for improved path handling in last modified date calculation
This commit is contained in:
parent
88d8d89171
commit
c5cc071590
@ -58,8 +58,7 @@ export const CreatedModifiedDate: QuartzTransformerPlugin<Partial<Options>> = (u
|
|||||||
// or 1+ level higher in case of a submodule/subtree setup
|
// or 1+ level higher in case of a submodule/subtree setup
|
||||||
repo = Repository.discover(fullFp)
|
repo = Repository.discover(fullFp)
|
||||||
}
|
}
|
||||||
|
const relativePath = path.relative(repo.workdir()!, fullFp)
|
||||||
var relativePath = fullFp.replace(repo.workdir()!, "")
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
modified ||= await repo.getFileLatestModifiedDateAsync(relativePath)
|
modified ||= await repo.getFileLatestModifiedDateAsync(relativePath)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user