From ce330e1c0ea699f94b0d1023bc9904a82d0e1d70 Mon Sep 17 00:00:00 2001 From: Chris Holdgraf Date: Mon, 20 Feb 2023 03:30:30 +0100 Subject: [PATCH 1/2] Add conditional check for last-updated template --- .../theme/pydata_sphinx_theme/components/last-updated.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html index 9edd7516f..6c240acfc 100644 --- a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html +++ b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html @@ -1,4 +1,6 @@ +{% if last_updated %}

{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}

+{% endif %} From 4b7e3094c530568536889dfbd482d093cb538705 Mon Sep 17 00:00:00 2001 From: Chris Holdgraf Date: Mon, 20 Feb 2023 03:31:34 +0100 Subject: [PATCH 2/2] Whitespace --- .../theme/pydata_sphinx_theme/components/last-updated.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html index 6c240acfc..8a4f137e3 100644 --- a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html +++ b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/last-updated.html @@ -1,6 +1,6 @@ -{% if last_updated %} +{%- if last_updated -%}

{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}

-{% endif %} +{%- endif -%}