Discussion:
Is there an extension that grabs the last time each RST/HTML page in a project was updated?
(too old to reply)
Rachel Neubert
2017-10-18 21:56:30 UTC
Permalink
Hey sphinx-dev,

I'd like to add a line in the footer of each HTML page in my project
displaying the date when that page was last modified.

I've already discovered the html_last_updated_fmt config option, but this
option is a little misleading as it is the date the project was last *built*,
meaning that this value will be the same for each page in my docs.

Does anyone know of an extension that does what I'm looking for?

Thanks in advance! Rachel
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rob van der Valk
2017-10-19 13:55:34 UTC
Permalink
Hi Rachel,

Sounds like something I would actually like too. I really see too many
responses on the web where it is unclear whether it is recent, and in my
line of work that turns out as a killer, having one part of a chip not fit
with another, for instance....

If nobody responds within say a week I think I would be more than happy to
make it happen or maybe better, try. I think it should not be crazily
complex...

Best regards,
Rob
Post by Rachel Neubert
Hey sphinx-dev,
I'd like to add a line in the footer of each HTML page in my project
displaying the date when that page was last modified.
I've already discovered the html_last_updated_fmt config option, but this
option is a little misleading as it is the date the project was last
*built*, meaning that this value will be the same for each page in my
docs.
Does anyone know of an extension that does what I'm looking for?
Thanks in advance! Rachel
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Doug Hellmann
2017-10-19 14:10:52 UTC
Permalink
Post by Rachel Neubert
Hey sphinx-dev,
I'd like to add a line in the footer of each HTML page in my project
displaying the date when that page was last modified.
I've already discovered the html_last_updated_fmt config option, but this
option is a little misleading as it is the date the project was last *built*,
meaning that this value will be the same for each page in my docs.
Does anyone know of an extension that does what I'm looking for?
Thanks in advance! Rachel
If you're using git, you could reproduce some of what I'm doing for
pymotw.com via
https://bitbucket.org/dhellmann/pymotw-3/src/17b6ea3b657b93ad45b6ccd5c295e767f4f4be71/source/conf.py?at=master&fileviewer=file-view-default#conf.py-449
and the last line in the html-page-context hook (line 498).

It wouldn't be hard to turn that into an extension, if you wanted to
publish it. I can help you set up a repo under the collective
https://github.com/sphinx-contrib/ if you'd like.

Doug
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Komiya Takeshi
2017-10-21 06:36:29 UTC
Permalink
Hi Rachel,

Yes, Sphinx uses current time for last_updated. It does not refer
timestamp of the file. I don't know why. But I feel the timestamp is
not accuracy. For example, it is easily changed with git.
So I think some extension is needed for your case.

I think Doug's script will help you.

Thanks,
Takeshi KOMIYA
Post by Rachel Neubert
Hey sphinx-dev,
I'd like to add a line in the footer of each HTML page in my project
displaying the date when that page was last modified.
I've already discovered the html_last_updated_fmt config option, but this
option is a little misleading as it is the date the project was last built,
meaning that this value will be the same for each page in my docs.
Does anyone know of an extension that does what I'm looking for?
Thanks in advance! Rachel
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...