-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Footer: show both "commit" and "last_updated" (if available) #897
Conversation
Any comments on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good fix 👍
What about merging this? Is there anything that still needs to be done? |
@agjohnson this look good to you? I'm 👍 on it. |
@mgeier sorry for the delay, we'll get it merged here soon, once Anthony is 👍 on it. |
So, the extension that @mgeier wrote is the information that I'd want to have in the footer -- that is, the last modified date is the last commit date of the source file. However, under normal usage without the extension, the last modified date is the date of the build of the project[1] -- so this information would no longer be truthy. It's actually probably more of a negative change to users, as RTD rebuilds projects clean every build, so I believe that a file that has not changed in years would show "last modified $today" on output. So, this PR likely has too many unwanted side effects as-is for all the standard RTD users, but is there a better way to make the two extensions integrate in a nicer fashion? If we could detect when this extension is in use, or when we have a For an estimated time frame, we have some time off and large projects to contend with right now, so the next feature release of this theme is likely in august. We have a few new features we want to release then, but expect bandwidth to be limited more immediately. |
I don't think so. The important point is that a user has to opt-in to displaying the "last changed" date anyway, by specifying
Therefore, "standard RTD users" will not see the date, neither before nor after this PR.
Yes, but only if the author has opted into displaying it.
I guess that's possible, but it's strictly unnecessary.
This would be nice, but a user might as well just use my extension.
OK, good to know! |
Ah! So this is a detail I didn't know. This changes my opinion then, as the user has all of the control over the display of the last_updated variable. This PR should be safe. It still isn't ideal that the date will be the last project build date, but that isn't something we'd solve in this theme.
Yup, I was describing some option your extension could surface so this and other themes could be aware of it. I don't think this is necessary now though, as we can expect |
nice to have, to see when each page was last updated? could be helpful to find stale docs. references - readthedocs/sphinx_rtd_theme#897 (comment) - https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_last_updated_fmt
Closes #238.