Skip to content

Commit

Permalink
fix: preserve existing vcsPath when enriching a file with front matter
Browse files Browse the repository at this point in the history
  • Loading branch information
brotheroftux committed Jul 15, 2024
1 parent a39edb0 commit 58de41e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/services/metadata/enrich.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ export const enrichWithFrontMatter = async ({
metadataVars,
systemVars: addSystemMeta ? systemVars : undefined,
additionalMetadata: {
vcsPath: shouldAlwaysAddVCSPath
? resolveVCSPath(metadata, pathData.pathToFile)
: undefined,
vcsPath:
metadata.vcsPath ??
(shouldAlwaysAddVCSPath
? resolveVCSPath(metadata, pathData.pathToFile)
: undefined),
...vcsFrontMatter,
},
});
Expand Down

0 comments on commit 58de41e

Please sign in to comment.