You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In issue #160@AWhetter mentions that it is possible to introduce custom Jinja2 filters to sphinx-autoapi via the conf.py. I am not quite sure how this is supposed to happen. While Sphinx will execfile() the conf.py, the Jinja2 environment spawned there, would be different from the one created in mappers/base.py.
Hence, I am not seeing a way to provide sphinx-autoapi with custom filters. Would you mind explaining how this can be achieved?
Edit: I could imagine this feature could also be provided by a execfile() on a Python source code file, defined in the conf.py, where the Jinja2 object is passed into. A user can then arbitrarily customize the Jinja2 instance.
The text was updated successfully, but these errors were encountered:
This currently isn't possible. It's still something that I think would be useful. I envisioned it as working by adding a new option in conf.py that would take a list of Jinja filters (and tests and globals) defined in the conf.py and that eventually get passed into the jinja environment here.
We would also need to tidy up the API of PythonPythonMapper objects. We document them but it would be a good idea to make sure that they are conforming to the documentation and making anything private that needs to be and documenting anything that needs to be.
In issue #160 @AWhetter mentions that it is possible to introduce custom Jinja2 filters to sphinx-autoapi via the conf.py. I am not quite sure how this is supposed to happen. While Sphinx will execfile() the conf.py, the Jinja2 environment spawned there, would be different from the one created in mappers/base.py.
Hence, I am not seeing a way to provide sphinx-autoapi with custom filters. Would you mind explaining how this can be achieved?
Edit: I could imagine this feature could also be provided by a execfile() on a Python source code file, defined in the conf.py, where the Jinja2 object is passed into. A user can then arbitrarily customize the Jinja2 instance.
The text was updated successfully, but these errors were encountered: