Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timestamp as document footer #40

Open
toderash opened this issue Nov 17, 2024 · 5 comments · Fixed by #42
Open

Add timestamp as document footer #40

toderash opened this issue Nov 17, 2024 · 5 comments · Fixed by #42
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@toderash
Copy link

I would like to include a timestamp on our documents, such as "This document was last modified on November 16, 2024 at 05:00 UTC."

This should be don for each file in the documentation repo as well as the governance repo and the interop spec repo... basically all the document files (.md etc, as opposed to code).

The date should be appear as a footer below a horizontal line, and be derived from the file timestamp or date/time that it is merged.

Some latitude is given for how this is best to implement. Automating it would be best, though a shortcode of sorts that gets parsed when committed would work, just relies on an extra step. What I'm looking for is a notice that would not only show up on Github, but also appear when the document appears at docs.aspirepress.org so the latest version date is open and transparent without anyone having to navigate gh prs to find it.

@toderash toderash added enhancement New feature or request documentation Improvements or additions to documentation labels Nov 17, 2024
@asirota
Copy link
Member

asirota commented Nov 17, 2024

This is an implementation

just-the-docs/just-the-docs#711

@toderash
Copy link
Author

I like the approach of a global footer to insert the timestamp, as it lets us easily add other material like the license info and links. The examples shown offer configuration of date and time format, but I didn't see timezone. If that's there and just not in the example, then this works for me. (Commenting on the footer implementation, not the whole theme.)

@AmnestyAM AmnestyAM self-assigned this Nov 19, 2024
AmnestyAM added a commit to AmnestyAM/documentation that referenced this issue Nov 23, 2024
I need to add the Gem file too.

aspirepress#40

Signed-off-by: Amnesty AM <[email protected]>
@asirota
Copy link
Member

asirota commented Nov 26, 2024

This doesn't seem to work with the latest push. @AmnestyAM

@asirota asirota reopened this Nov 26, 2024
@AmnestyAM
Copy link
Contributor

yeah it outputs the HTML but nothing inside, My guess is it needs the front matter, and then overrides it. I will set up a Jekyll site locally on the weekend, so I can test it more thoroughly

@asirota
Copy link
Member

asirota commented Nov 26, 2024

front matter example for _config.yml

last_edit_timestamp: true # show or hide edit time - page must have last_modified_date defined in the frontmatter
last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants