From 5891c6fb88a79e49bb94095e6f3bbe698a74b9a5 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 17 May 2026 16:08:21 -0500 Subject: [PATCH 1/4] theme(fix[sidebar-logo]) Preload + fetchpriority=high for logo HTML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit why: Sidebar logo is the LCP element on every consumer docs site, and the bundled templates were emitting `` hints — a low-priority "future navigation" directive browsers defer to idle. Web-Vitals recorded LCP timings of 2.7-6.7s instead of the sub-second range fonts already achieve via preload. what: - gp-furo-theme/base.html: switch logo_prefetch_links to `rel="preload"` + `fetchpriority="high"` on the three logo URLs. Block name kept for downstream override compatibility. - gp-furo-theme/sidebar/brand.html: add width="200" height="200" decoding="async" fetchpriority="high" to the three img variants so the standalone template matches sphinx-gp-theme's overlay. - sphinx-gp-theme/sidebar/brand.html: add fetchpriority="high" to the three img variants; width/height/decoding already present. --- .../src/gp_furo_theme/theme/gp-furo/base.html | 11 ++++++++--- .../gp_furo_theme/theme/gp-furo/sidebar/brand.html | 10 +++++++--- .../src/sphinx_gp_theme/theme/sidebar/brand.html | 6 +++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/gp-furo-theme/src/gp_furo_theme/theme/gp-furo/base.html b/packages/gp-furo-theme/src/gp_furo_theme/theme/gp-furo/base.html index b4bf8331..740fa671 100644 --- a/packages/gp-furo-theme/src/gp_furo_theme/theme/gp-furo/base.html +++ b/packages/gp-furo-theme/src/gp_furo_theme/theme/gp-furo/base.html @@ -33,13 +33,18 @@ {%- endif %} + {#- The sidebar logo is the LCP element on most consumer docs sites. + `rel="preload"` (not `prefetch`) plus `fetchpriority="high"` + promotes it from idle-queue to critical-path, dropping LCP from + several seconds to sub-second. Block name is preserved for + backwards compatibility with downstream template overrides. -#} {%- block logo_prefetch_links %} {%- if logo_url %} - + {%- endif %} {%- if theme_light_logo and theme_dark_logo %} - - + + {%- endif %} {%- endblock logo_prefetch_links %} {%- endblock linktags %} diff --git a/packages/gp-furo-theme/src/gp_furo_theme/theme/gp-furo/sidebar/brand.html b/packages/gp-furo-theme/src/gp_furo_theme/theme/gp-furo/sidebar/brand.html index 6e494b5e..7a180d24 100644 --- a/packages/gp-furo-theme/src/gp_furo_theme/theme/gp-furo/sidebar/brand.html +++ b/packages/gp-furo-theme/src/gp_furo_theme/theme/gp-furo/sidebar/brand.html @@ -15,15 +15,19 @@