def builder_inited(app):
        """Update the Sphinx builder.

        :param sphinx.application.Sphinx app: Sphinx application object.
        """
        # Add this extension's _templates directory to Sphinx.
        templates_dir = os.path.join(os.path.dirname(__file__), '_templates')
        app.builder.templates.pathchain.insert(0, templates_dir)
        app.builder.templates.loaders.insert(0, SphinxFileSystemLoader(templates_dir))
        app.builder.templates.templatepathlen += 1

        # Add versions.html to sidebar.
        if '**' not in app.config.html_sidebars:
            app.config.html_sidebars['**'] = StandaloneHTMLBuilder.default_sidebars + ['versions.html']
        elif 'versions.html' not in app.config.html_sidebars['**']:
            app.config.html_sidebars['**'].append('versions.html')
def builder_inited ( app ) : templates_dir = os . path . join ( os . path . dirname ( __file__ ) , '_templates' ) app . builder . templates . pathchain . insert ( 0 , templates_dir ) app . builder . templates . loaders . insert ( 0 , SphinxFileSystemLoader ( templates_dir ) ) app . builder . templates . templatepathlen += 1 if '**' not in app . config . html_sidebars : app . config . html_sidebars [ '**' ] = StandaloneHTMLBuilder . default_sidebars + [ 'versions.html' ] elif 'versions.html' not in app . config . html_sidebars [ '**' ] : app . config . html_sidebars [ '**' ] . append ( 'versions.html' )
Update the Sphinx builder.

        :param sphinx.application.Sphinx app: Sphinx application object.