{% extends "pydata_sphinx_theme/layout.html" %} {# htmltitle controls the HTML title node. On some pages we customize the title to make it more usable. #} {% block htmltitle %} {# Override the title for some module pages. #} {% if pagename.startswith('pw_') %} {% set tokens = pagename.split('/') %} {% set module_name = tokens[0] %} {% set maybe_doc_name = tokens[1] %} {% if maybe_doc_name == 'docs' %} {# It's the homepage for a module. Use the normal title. #} {{ title|striptags|e }}{{ titlesuffix }} {% else %} {# It's a subpage of the module's docs, e.g. the API reference. Prepend the module's name so that it's easier to see what module this doc is related to. E.g. before our change the default title just says "API reference - Pigweed" and after our change it says "pw_string: API reference - Pigweed". #} {{ module_name }}: {{ title|striptags|e }}{{ titlesuffix }} {% endif %} {# It's a non-module page. Use the normal title. #} {% else %} {{ title|striptags|e }}{{ titlesuffix }} {% endif %} {% endblock %} {% block extrahead %} {{ super() }} {% endblock extrahead %} {% block docs_main %} {{ super() }} {# The following scripts are loaded after the main content in order to improve load performance. Background: https://developer.chrome.com/docs/lighthouse/performance/render-blocking-resources #} {% if pagename == 'search' %} {# Search tools are already loaded on search page. Don't load them twice. #} {% else %} {# Load Sphinx's built-in search tools so that our custom inline search experience (see pigweed.js) can work on all pages. #} {% endif %} {# Always load pigweed.js after Sphinx's search scripts because pigweed.js relies on classes and data from Sphinx's scripts. #} {% endblock docs_main %}