Merge pull request #8937 from jantonguirao/fix_explicit_title_subpages

Use explicit title instead of <no title> in the title bar of subpages
This commit is contained in:
Takeshi KOMIYA 2021-03-02 22:26:11 +09:00 committed by GitHub
commit a638a8d582
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ class TitleCollector(EnvironmentCollector):
break
else:
# document has no title
titlenode += nodes.Text('<no title>')
titlenode += nodes.Text(doctree.get('title', '<no title>'))
app.env.titles[app.env.docname] = titlenode
app.env.longtitles[app.env.docname] = longtitlenode