A site that configures neither the theme's authors option nor Sphinx's own author value renders the literal text Author name not set in the page header, on every page.
Reproduce
A minimal conf.py with no author and no authors:
project = "No Author"
master_doc = "index"
html_theme = "quantecon_book_theme"
The built page contains <p class="qe-page__header-authors" font-size="18">Author name not set</p>.
Cause
src/quantecon_book_theme/__init__.py:532 guards the author fallback against Sphinx's placeholder value:
if app.config.author != "unknown":
context["author"] = app.config.author
Sphinx changed that placeholder. Sphinx 5 and 6 defaulted author to unknown, but Sphinx 7.4 and later default it to Author name not set, so the guard no longer matches and the placeholder flows through to the template's author fallback in layout.html. The theme pins sphinx>=7,<9, so every supported version from 7.4 up is affected.
Verified against Sphinx 8.2.3: Config({}, {}).author returns 'Author name not set'.
Note on the fix
Checking for both placeholder strings in this repo is probably not sufficient on its own. sphinx_book_theme sets context["author"] with the same stale guard, so the value can arrive from there regardless of what this theme does. Since add_to_context is connected last, the more robust fix is to clear the key outright when the config value is one of the known placeholders, rather than only declining to set it.
Worth noting that the fixtures site masks this: _config.yml sets author: QuantEcon, so the visual snapshots would not show the regression even though downstream books are affected.
Found while implementing #426. That PR touches the adjacent conditional in the same template block but neither introduces nor fixes this.
A site that configures neither the theme's
authorsoption nor Sphinx's ownauthorvalue renders the literal textAuthor name not setin the page header, on every page.Reproduce
A minimal
conf.pywith noauthorand noauthors:The built page contains
<p class="qe-page__header-authors" font-size="18">Author name not set</p>.Cause
src/quantecon_book_theme/__init__.py:532guards the author fallback against Sphinx's placeholder value:Sphinx changed that placeholder. Sphinx 5 and 6 defaulted
authortounknown, but Sphinx 7.4 and later default it toAuthor name not set, so the guard no longer matches and the placeholder flows through to the template's author fallback inlayout.html. The theme pinssphinx>=7,<9, so every supported version from 7.4 up is affected.Verified against Sphinx 8.2.3:
Config({}, {}).authorreturns'Author name not set'.Note on the fix
Checking for both placeholder strings in this repo is probably not sufficient on its own.
sphinx_book_themesetscontext["author"]with the same stale guard, so the value can arrive from there regardless of what this theme does. Sinceadd_to_contextis connected last, the more robust fix is to clear the key outright when the config value is one of the known placeholders, rather than only declining to set it.Worth noting that the fixtures site masks this:
_config.ymlsetsauthor: QuantEcon, so the visual snapshots would not show the regression even though downstream books are affected.Found while implementing #426. That PR touches the adjacent conditional in the same template block but neither introduces nor fixes this.