gatsby-theme-carbon icon indicating copy to clipboard operation
gatsby-theme-carbon copied to clipboard

Add page last updated automatically

Open eng618 opened this issue 3 years ago • 1 comments
trafficstars

Summary

Add date page was last updated automatically rather than manually changing it in frontmatter.

Justification

It's very easy to overlook updating the date a page was updated every time you make a change. So having this done automatically solves that problem. Also gives you more relient information.

Desired UX and success metrics

Rather than setting the actual date in the front matter you can set it with a boolean to display the date last updated.

Must-have functionality

Automatically generate the tag at the bottom of the page with the last updated date. This can be either site wide, or on a per page basis.

Specific timeline issues / requests

No timeline

Available extra resources

Not a lot of time to look into adding this myself atm. May have some time in the future.

eng618 avatar Mar 03 '22 20:03 eng618

Essentially rather than manually setting the date in frontmatter like this:

---
...
date: 3 March 2022
---

It would be great to have it defined as a boolean to enable the date for that particular page, then it can use the git history to populate the date last updated.

---
...
displayDateLastModified: true
---

(or some other key)

Examples

Here is an example of it in the current state:

image

Example of how this gets outdated easily in the theme repo as well:

Screen Shot 2022-03-03 at 3 39 46 PM

eng618 avatar Mar 03 '22 20:03 eng618