Auto-update last updated dates
You can use a GitHub Action to automatically update the last-updated frontmatter property whenever MDX files are modified in a pull request. This keeps your documentation’s “Last updated” dates accurate without manual updates.
Set up the workflow
Add this GitHub Action workflow to your documentation repository.
When a pull request is opened or updated, the workflow detects which MDX files changed, updates or adds a last-updated field in their frontmatter with the current date, and commits the changes back to the PR branch.
The date format is “Month Day, Year” (e.g., “December 11, 2025”). You can customize this by modifying the date command in the workflow.
.github/workflows/update-last-updated.yml