Last modified time
With BrainDB
- Install BrainDB
- Then you can access modification date, like this
With Starlight
Starlight already has this feature, but value not exposed in content collection e.g. if you set
You would see Last updated:
on the page, but at the same time page.data.lastUpdated
would be undefined
With remark plugin
-
Create remark plugin
-
Configure Astro
-
You may need to adjust content schema
But the value is accessible only after render
e.g.
Based on: Astro recipes
Further improvements
Use last modification date (for content pages) in:
- schema.org microdata
- sitemap (
lastmod
)