Implementation. Fixes #22.

This commit is contained in:
Jeff Forcier 2014-04-03 14:21:19 -07:00
parent d99e5d4ac7
commit 1529533f59

View file

@ -418,7 +418,7 @@ def generate_changelog(app, doctree):
# This seems to be the cleanest way to tell what a not-fully-parsed # This seems to be the cleanest way to tell what a not-fully-parsed
# document's 'name' is. Also lol @ not fully implementing dict protocol. # document's 'name' is. Also lol @ not fully implementing dict protocol.
source = doctree[0] source = doctree[0]
if 'changelog' not in source.get('names', []): if app.config.releases_document_name not in source.get('names', []):
return return
# Second item inside main document is the 'modern' changelog bullet-list # Second item inside main document is the 'modern' changelog bullet-list
# object, whose children are the nodes we care about. # object, whose children are the nodes we care about.
@ -441,6 +441,9 @@ def setup(app):
# Convenience Github version of above # Convenience Github version of above
app.add_config_value(name='releases_github_path', default=None, app.add_config_value(name='releases_github_path', default=None,
rebuild='html') rebuild='html')
# Which document to use as the changelog
app.add_config_value(name='releases_document_name', default='changelog',
rebuild='html')
# Debug output # Debug output
app.add_config_value(name='releases_debug', default=False, rebuild='html') app.add_config_value(name='releases_debug', default=False, rebuild='html')
# Register intermediate roles # Register intermediate roles