Skip to content

Pattern for auto-loading extension (probably fixing elsewhere) #23

Open
@benjaoming

Description

@benjaoming

This isn't an issue in this extension, just want to flag it here for further input.

AFAICT, #14 added an option for configuration and thus JS injection happens on the event config-inited. But it turns out that calling app.setup_extension("sphinxcontrib.jquery") from themes stopped working since somehow it happens after config-inited is fired:

https://github.com/readthedocs/sphinx_rtd_theme/blob/ee64d37ac95fcfe7a1e53d7ab72e09704606261e/sphinx_rtd_theme/__init__.py#L56-L60

I'm thinking that the extension can just call add_js_files directly. But it'd be nice that the contract is clear so it doesn't break again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions