Closed simonw closed 2 years ago
https://github.com/beanbaginc/beanbag-docutils/blob/master/beanbag_docutils/sphinx/ext/github.py via https://twitter.com/chipx86/status/1558271211901050880 looks like a good option.
It works using this Sphinx mechanism: https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html
I tried it out and ran into a bug, which I've reported and submitted a PR for:
I'm going to ship a version that uses my fork of the repo here: https://github.com/simonw/beanbag-docutils/tree/bytes-in-url
Source links are now live here: https://sqlite-utils.datasette.io/en/latest/reference.html
Extracted a TIL: https://til.simonwillison.net/python/setup-py-from-url
I may be able to do this without that extra dependency: https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html
Twitter conversation asking for ways to automate this here: https://twitter.com/simonw/status/1558260492015046656