Thank you Shimizukawa-san. I used the technique you pointed to since it was easiest for my case.
It's still not clear to me how to create variables in the conf.py file that the theme files can access (in my case footer.html). Since I wasn't using the `release` value for anything, I stuck the SHA there, but it seems very hackish. If you have time, can you point me to a place in the doc or code that describes how to make new variables visible in theme files? I've looked, but haven't been able to find it. Thank you again for your help. --Philip. On Wednesday, November 11, 2015 at 8:30:01 AM UTC-5, Takayuki SHIMIZUKAWA wrote: > > 2015/11/11 17:52 Jim Easterbrook <[email protected] <javascript:> > >: > >> On 11/11/15 03:57, Sam Kleinman wrote: >> > >> > 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>. >> >> Getting the current commit is easily done with the 'gitpython' package >> from PyPI: >> >> import git >> repo = git.Repo() >> last_commit = str(repo.head.commit)[:7] >> > > Nice. > If you don't want to install extra python package, you can use Popen > python std library and git command to achieve that. > Develop version of Sphinx is using the way. > Please refer: > https://github.com/sphinx-doc/sphinx/blob/e2da583/sphinx/__init__.py#L37 > > > >> -- >> Jim Easterbrook <http://www.jim-easterbrook.me.uk/> >> > > > Regards, > -- > Takayuki SHIMIZUKAWA > http://about.me/shimizukawa > -- 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.
