sphinx-gitstamp icon indicating copy to clipboard operation
sphinx-gitstamp copied to clipboard

Integrate into Sphinx core(?)

Open AA-Turner opened this issue 2 years ago • 4 comments

Hi Jared (@jdillard),

I found out about this project after breaking it in Sphinx 7.2 -- sorry!

I wondered if you'd be amenable to integrating this as a first-party supported Sphinx extension -- either in the core directly or in @sphinx-doc. I wrote similar code for Python's PEP generation, so I can see the use-case.

If you'd prefer to keep this third-party, no worries -- the question arose as I was considering adding the feature to Sphinx core anyway, and it might make sense to capitalise on the work that you've done here.

Thanks, Adam

AA-Turner avatar Aug 25 '23 20:08 AA-Turner

No worries!

I'd be happy if this functionality was a core part of Sphinx! Have you seen https://github.com/mgeier/sphinx-last-updated-by-git? I'm wondering if that would be a better implementation, not to mention @mgeier is a wizard (I've been following his development of that extension to improve my skills as I am an "assistant to the wizard" at best). He kind of talks about the differences between our two extensions here: https://github.com/mgeier/sphinx-last-updated-by-git/issues/34#issuecomment-1073244133

And just to note, I'm not protective over this extension or it's concept, I just found the implementation in https://github.com/cyrusimap/cyrus-imapd/pull/2029 a while back and turned it into an extension to improve my understanding of Sphinx/Python. So if other (more qualified) people want to run with it, I am totally fine with that, but also happy to help.

-Jared

jdillard avatar Aug 25 '23 22:08 jdillard

@AA-Turner Bumping this and see if I can be of help. AFAIK, none of the existing extensions can work around the fact that git timestamps are wrong or overwritten when regenerating all files (for example, in Dockerized environments). I've tried git-restore-mtime to solve this, to no avail. So, not sure how one can get Sphinx to render doc timestamps that are faithful to the last modification date of the source.

theletterf avatar Jun 17 '24 16:06 theletterf

You can ignore the above, @theletterf was pointed to the cause of his issue: https://github.com/mgeier/sphinx-last-updated-by-git/issues/76

jdillard avatar Jun 20 '24 16:06 jdillard

Yup.

theletterf avatar Jun 20 '24 16:06 theletterf