Page History

Troubleshooting

Fixes for missing footers, outdated history, and build errors.

A page gets its footer only after its first commit, unless its frontmatter lists authors. Commit the page, then restart the development server.

In development, Page History logs the Git path it looked up for each page without history. If that path looks wrong, check your content mapping.

History did not update after a commit

History is saved into the page when it compiles, and a commit on its own doesn't trigger a recompile. Restart the development server, or run a fresh production build.

Workspace changes work differently: their highlights update by themselves after you stage, commit, or revert.

Check these in order:

  1. The plugin is registered in the collection that compiles this page. If the collection sets its own compiler options, the global ones don't apply to it.
  2. The page isn't skipped by filter or by gitChangelog in its frontmatter.
  3. The file has commits under the Git path that Page History looks up.
  4. The page is Markdown or MDX. Generated pages, such as OpenAPI pages, and React pages don't go through the plugin. Use the Advanced API for those.

Workspace highlights are missing or reconnecting

  1. Make sure you're running the development server. Production builds never show highlights; the demo uses saved examples instead.
  2. Check both setup steps: the workspaceChanges option and the API route.
  3. Make sure contentDirectory is relative to the Git root, including the app's folder if it lives in a subfolder, and open the site through localhost.
  4. After saving, wait for the rebuild to finish. Highlights appear once the page shows your latest save, and failed requests retry automatically.

A "Page metadata changed" notice means the frontmatter changed, such as the title or description; the body may be the same. Some files can't be compared at all. See Scope and limits.

Git is missing or the checkout is shallow

The build needs Git and the repository's full history. If Git is missing or a Git command fails, the build fails. Shallow clones are rejected on purpose, so you never publish incomplete history.

Run git fetch --unshallow, or in GitHub Actions, use actions/checkout with fetch-depth: 0. The deployed site itself doesn't need Git. If you read history with the Advanced API at runtime instead, save it as JSON during the build.

A contributor has initials instead of an avatar

Page History can't tell which GitHub account a Git name or ordinary email belongs to. Commits made with a GitHub noreply email are matched automatically. For anyone else, add an author mapping, which needs no token, or turn on GitHub lookup, which needs a token during the build and works only for commits already pushed to GitHub.

Dates are Chinese but labels are English

display.locale changes only dates and contributor names. Labels come from your site's translations; add them as described in Display & language.

A date changes after the page loads

The server renders dates in UTC. Once the page loads, it switches them to the reader's time zone, which can move a date by one day. Hover a date to see the exact local time; the datetime attribute always holds the original timestamp.

Contributors

Page history