LastUpdated
This component is mainly used in conjunction with wrap/eject in Custom Theme , and is different from components that are directly imported in MDX. You can modify the styles and functions by passing component props or directly overriding the component. If you override the entire component through eject, please note that the reading of the corresponding configuration options of the component will become invalid and you need to control it yourself.
LastUpdated displays the page's last updated time, and optionally the last author. Typically used with the theme's lastUpdated configuration.
Usage
Last Updated: 6/11/2026, 10:53:48 AM
This component doesn't accept any props and automatically reads the last updated time from page metadata.
Related configuration
Enable lastUpdated in rspress.config.ts:
When lastUpdated is enabled, the component automatically reads and formats the page metadata.
Displaying the author
Configure lastUpdated.author to display the last commit author:
The callback receives { name, email, filePath } (the commit author info from git log and the source file path) and returns the string to render.
To customize the display text or time format, you can export and modify theme/components/LastUpdated/index.tsx using rspress eject LastUpdated.