If you can et the current git commit into your conf.py, you can set it
in the ``html_theme_options`` dictionary:
<http://sphinx-doc.org/config.html#confval-html_theme_options>. What you
do with this value once it makes its way into the template, is your own
business. :)

There are some problems here, mostly that every time you commit to the
repository, the hash of the configuration changes, which means you have
to rebuild all files. There may also be some weirdness deepening on how
you get the git-hash and your build environment. Do you ever build from
a dirty working tree? Do you ever build from a detached head state?

Cheers,
sam

On Friday, October 30 2015, 13:58:18, Philip Borenstein wrote:

> Hello,
>
> I'm using the sphinx_rtd_theme for documentation that we serve locally (not
> on readthedocs.org).
>
> I'd like to include the git SHA of the commit in the footer (like rtd.org
> does), but I can't seem to find a way to do it. There is code in the
> footer.html template to set this, but neither my jinja nor python chops are
> strong enough to figure this out.
>
> (Incidentally, where _do_ variables used in the templates get set, anyway?)
>
> TIA,
>
> --Philip Borenstein.

--
Sam Kleinman (tychoish):
 - [email protected]
 - tychoish <http://tychoish.com/>
 "don't get it right, get it written" -- james thurber

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to