mirror of
https://github.com/vale981/releases
synced 2025-03-05 17:51:42 -05:00
Use actual document name instead of document *title*, ugh
This commit is contained in:
parent
cc7d7056a1
commit
554e30a18f
1 changed files with 2 additions and 4 deletions
|
@ -415,13 +415,11 @@ def construct_nodes(releases):
|
|||
|
||||
|
||||
def generate_changelog(app, doctree):
|
||||
# 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.
|
||||
source = doctree[0]
|
||||
if app.config.releases_document_name not in source.get('names', []):
|
||||
if app.env.docname != app.config.releases_document_name:
|
||||
return
|
||||
# Second item inside main document is the 'modern' changelog bullet-list
|
||||
# object, whose children are the nodes we care about.
|
||||
source = doctree[0]
|
||||
changelog = source.children.pop(1)
|
||||
# Walk + parse into release mapping
|
||||
releases = construct_releases(changelog.children, app)
|
||||
|
|
Loading…
Add table
Reference in a new issue