-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
contribution welcomeContributions welcomeContributions welcometype: feature requestRequest to add a new featureRequest to add a new feature
Description
It may be useful to have an optional "last updated" timestamp displayed on a page, especially for docs that may not be tied to specific release versions.
I was thinking this could be automated nicely with git during build on a page-by-page basis with something like:
git log -1 --format="%ct" [file]
# returns timestamp in seconds of last commit of file
# easily used to create JS Date
Could also do the whole docs directory in one batch with something like:
git ls-tree -r --name-only HEAD docs | while read filename; do echo "$(git log -1 --format="%ct" -- $filename) $filename"; done
# returns lines of "timestamp filepath"
# could be modified to return a JSON array
If anyone likes this idea, do you have preferences on where the timestamp would be displayed? Next to the edit link or under page header?
I would be happy to attempt an implementation if this is of interest.
ulivz, EnMod and GameDevLlamameteorlxy
Metadata
Metadata
Assignees
Labels
contribution welcomeContributions welcomeContributions welcometype: feature requestRequest to add a new featureRequest to add a new feature