Overview
High-level description
This code defines a custom layout template for a Sphinx documentation site, inheriting from the pydata_sphinx_theme/layout.html
template and overriding the fonts
block to specify font families for the body and header elements.
Symbols
{% extends "pydata_sphinx_theme/layout.html" %}
Description
This line instructs the template engine to inherit the base layout from the pydata_sphinx_theme/layout.html
file. This means that the current template will use the structure and elements defined in the base template, and only the overridden blocks will be different.
{% block fonts %}
… {% endblock %}
Description
This block overrides the fonts
block defined in the base template. It allows customizing the fonts used in the documentation site.
Internal Logic
The code within this block defines a <style>
tag containing CSS rules for the body
and .header-style
elements.
body { font-family: ...; }
: This rule sets the font family for the entire body of the documentation pages. It uses a font stack starting with system fonts for better cross-platform consistency and falls back to generic sans-serif fonts..header-style { font-family: ...; }
: This rule sets the font family for elements with the classheader-style
. It uses the same font stack as thebody
rule.
Dependencies
This template depends on the pydata-sphinx-theme package, which provides the base layout template (pydata_sphinx_theme/layout.html
).