Skip to content

Tweaks to improve these extensions #12

@bjones1

Description

@bjones1

Thanks for this. It fixed a frustration that's been unaddressed for years in Sphinx. Great work!

One minor improvement: to avoid Sphinx errors about files not being included a toctree, you can add code in conf.py like:

if not tags.has("tag_used_in_only_directive"):
    exclude_patterns += [ "file_that_is_omitted_by_the_only_directive" ]

I saw this on SO, but can't remember exactly where. This seems like a nice docs improvement for this extension.

Also, an idea: I wonder if there's a way to to set env_version (see extension metadata) returned from setup based on the builder type, which (I think) would force a cache flush / rebuild if the builder changed? That is, set env_version to 0 for HTML, 1 for LaTeX, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions