Last Updated

The "Last updated" label shows readers when a page was last refreshed.

You do not add this component with markdown syntax. Retype renders it automatically in the page footer when lastUpdated is configured.

This component is Retype PRO only.

Retype can get the date automatically from the Git commit metadata, or you can set the values manually in page metadata.


By default, Retype tries to add the last updated date to every page by using the latest committer metadata from Git, as long as the build has full Git history. The by value is available too, but it is not enabled by default.

Use source: author or source: committer depending on whether you want the original author or the person who last committed a change.


Manual page values

If one page needs a fixed footer value, set it directly in the page metadata:

---
lastUpdated:
  date: 2026-03-12
  by: Documentation Team
---

You can also use the shortform lastUpdated and lastUpdatedBy syntax:

---
lastUpdated: 2026-03-12
lastUpdatedBy: Documentation Team
---

Full Git history required

Automatic values are only available when Retype can read the Git history for the page. If your project is not part of a Git repository, or only a shallow clone, Retype will not output the "Last updated" label.

For GitHub Actions, be sure to fetch the full history by including fetch-depth: 0 in the checkout action:

- uses: actions/checkout@v6
  with:
    fetch-depth: 0

See also the GitHub Actions guide.


Custom label templates

The text Retype renders for the last updated footer can be customized using label templates in retype.yml. Four templates cover the combinations of absolute vs. relative date formatting and with or without an author name.

retype.yml
labels:
  default:
    contentfooter-lastupdated-absolutetemplate: "Last updated on {0}"
    contentfooter-lastupdated-absolutebytemplate: "Last updated on {0} by {1}"
    contentfooter-lastupdated-relativetemplate: "Last updated {0}"
    contentfooter-lastupdated-relativebytemplate: "Last updated {0} by {1}"
Template key Placeholder Used when
contentfooter-lastupdated-absolutetemplate {0} = formatted date Absolute date, no author
contentfooter-lastupdated-absolutebytemplate {0} = formatted date, {1} = author name Absolute date with author
contentfooter-lastupdated-relativetemplate {0} = relative time string (e.g. "3 days ago") Relative date, no author
contentfooter-lastupdated-relativebytemplate {0} = relative time string, {1} = author name Relative date with author

Retype selects the appropriate template based on whether the date is rendered in absolute or relative format and whether an author name is present.

For full details on the labels configuration, including per-locale overrides, see the Labels and translations documentation.

component