Default tag in conf.py missing

Jason Moore avatarJason Moore created an issue

I would expect that if I call

sphinx-build -b html

tags.has('html') in conf.py would evaluate to True. The documentation (http://sphinx-doc.org/markup/misc.html#tags) makes it out like html, latex, and text are default tags for the only directive, but they don't seem to be for the tag object in conf.py.

It would be nice to know which builder was called in the conf.py file, without having to specify a tag.

Comments (2)

  1. Georg Brandl

    This can't work, since at the time the configuration is read, the builder isn't even initialized yet (because the builder needs a valid config). The tag "html"/"latex"... is not the builder name, it's the builder's format -- so that all HTML-like builders get "html" as the format tag. But to know the format, the builder must be initialized.

  2. Jason Moore

    Ok, thanks. I made use of the -t flag to set custom tags in conf.py file, which solved my use case. This was more of documentation clarity issue for me. I'll try to add a note to the docs on tags to clarify this and make a pull request.

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.