2015/11/11 17:52 Jim Easterbrook <[email protected]>: > 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.
