Skip to content

Instantly share code, notes, and snippets.

@knzm
Created November 11, 2012 06:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save knzm/4053935 to your computer and use it in GitHub Desktop.
Save knzm/4053935 to your computer and use it in GitHub Desktop.
# put it into your conf.py
def setup(app):
# disable versioning for speed
from sphinx.builders.gettext import I18nBuilder
I18nBuilder.versioning_method = 'none'
def doctree_read(app, doctree):
if not isinstance(app.builder, I18nBuilder):
return
from docutils import nodes
from sphinx.versioning import add_uids
list(add_uids(doctree, nodes.TextElement))
app.connect('doctree-read', doctree_read)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment