diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html
index 8c17ae90..ea77b2d1 100644
--- a/doc/_templates/layout.html
+++ b/doc/_templates/layout.html
@@ -1,8 +1,5 @@
{% extends "!layout.html" %}
-{# Custom CSS overrides #}
-{% set bootswatch_css_custom = ['_static/cppformat.css'] %}
-
{%- block content %}
{{ navBar() }}
diff --git a/doc/bootstrap/layout.html b/doc/bootstrap/layout.html
index 51a552df..dbefaaef 100644
--- a/doc/bootstrap/layout.html
+++ b/doc/bootstrap/layout.html
@@ -1,5 +1,8 @@
{% extends "basic/layout.html" %}
+{# Custom CSS overrides #}
+{% set bootswatch_css_custom = ['_static/cppformat.css'] %}
+
{% set theme_css_files = [] %}
{% if theme_bootstrap_version == "3" %}
{% set bootstrap_version, bootstrap_additional_css, navbar_version = "3.2.0", "theme", "" %}