Skip to content

Commit fad5d3e

Browse files
committed
fix(docs): always register the lastModified plugin so page types don't depend on git history
1 parent 32b8504 commit fad5d3e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎apps/docs/source.config.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ function readGitLastModified(): Map<string, Date> | undefined {
6161
const gitLastModified = readGitLastModified()
6262

6363
export default defineConfig({
64-
plugins: gitLastModified
65-
? [lastModified({ versionControl: async (file) => gitLastModified.get(path.resolve(file)) })]
66-
: [],
64+
/** Always registered so the generated page types are the same with or without git history. */
65+
plugins: [
66+
lastModified({ versionControl: async (file) => gitLastModified?.get(path.resolve(file)) }),
67+
],
6768
mdxOptions: {
6869
/**
6970
* Shiki defaults to `github-light` / `github-dark`, whose blues and purples appear nowhere

0 commit comments

Comments
 (0)