jinja2python-sphinx

How do I debug python sphinx themes?


I want to edit a Sphinx theme and can't understand what variables are present in the document. The official documentation lacks any kind of information.

How do I see what variables are present in the template?


Solution

  • I think this documentation page will help you - it describes what blocks, configuration variables, helper functions and global variables are available in the template.

    And, by default sphinx uses jinja2 templating language - so you can print out the whole template context, like it was suggested in this thread (not sure it'll work in your case).

    Hope that helps.