## Thought it looks better without the breadcrumbs bar, and kinda redunant since we have the sidebar nav
Origen v2
:

Table Of Contents

Contents

Previous topic

origen.web

Next topic

origen.web.origen_sphinx_extension.misc

origen.web.origen_sphinx_extension

sphinx extension which ties together the Sphinx app and the Origen app.

The :meth:setup nethod is called by Sphinx early on but much of the actual setup occurs in :meth:apply_origen_config, which is delayed until the config-inited event - allowing the user’s setup to initialize completely before Origen post-processes it.

Submodules

Functions

origen.web.origen_sphinx_extension.apply_origen_config(sphinx, config)

The setup() method Sphinx looks for will be run before the user’s config, allowing us to ‘preconfigure’ several items and make their config simpler, more static, and less error prone.

This method is hooked into sphinx’s config-inited event and is run AFTER their config has been processed. We can take their settings and overrides and combine them with what we have here.

Regarding theme options:

We’ll set the ‘html_theme’ to ‘origen’ by default, but if its overridden then all our theme stuff is skipped.

origen.web.origen_sphinx_extension.clean(partial_config)
origen.web.origen_sphinx_extension.setup(sphinx)

Sets up the origen sphinx extension

This will:

  • Register various config variables

  • Add the Origen and sphinxbootstrap4 themes

  • Set the theme to ‘origen’ (overridable by the user later)

  • Configure recommonmark

Changes to the Sphinx environment here are benign though - that is, changes here either have no effect if not used (such as adding paths or adding markdown support) or can be overridden in the user’s conf (such as the theme)

origen.web.origen_sphinx_extension.sphinx_ext(app, ext_name)