#67 Add "last modified" or "page creation date" to Fedora Docs
Closed: Fixed 2 years ago by darknao. Opened 6 years ago by tjzabel.

Currently, there is no easy way to tell when a doc has been created, or last updated. Due to the fact that software gets updated and outdated at times, it would be nice if docs had a date on them either on the top or bottom so those reading can determine relevance.


Need a picture on how documentation build process works. If it rebuilds everything from scratch, then timestamp will be updated every time to the latest one. This in turn will make all content marked as modified in version control. May require additional conversion steps just for this feature and that's why a diagram of the process is needed. Like some built with https://github.com/knsv/mermaid

We should determine if there is an AsciiDoc macro that returns a file's last modification date. I haven't had time to look, but I suspect this is what we can wire in to drive the date/time. The build system regenerates every html page everytime, but we should be able to pass this information through.

We are currently transitioning from AsciiBinder to Antora, so this can be worked on for the new system. I tend to do a hack on the new tooling on Fridays. If someone has time to research the macro, I'll see about getting passed through and updating the test site.

I'm going to have a go at this issue and the related one #128

Unfortunately, I haven't found anything that can help us in this regards...
AsciiDoc seems to provide a last-update variable which rely on the file's modification date.
But since everything is fetched from git repositories at build time, the last modified time has no meaning in our case (and this this variable is not even accessible from Antora anyway).

Another solution would be to query the git history for each file at build time (with Antora extensions), but again, not possible as Antora only works with shallow clone. This would only give us the last commit date for the whole component and not for each page.

The last idea I have in mind would be to use some kind of git-hook to automatically inject the created/updated date into the adoc header. Of course, this is only applicable for newly modified files, but we should be able to bake a one-shot script to apply those tags to all existing files.

Patch Antora to use --filter=blob:none instead of shallow clone and extract from git?

Metadata Update from @darknao:
- Issue tagged with: in-progress, stg, tooling

2 years ago

last content update date has been added in the footer

Metadata Update from @darknao:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

2 years ago

Log in to comment on this ticket.

Metadata
Boards 1
Tooling Status: Backlog