From c163931702167dfd206cae03a566efc7b3f5fddc Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 11 Sep 2019 17:25:12 +0100 Subject: [PATCH] fix: HTML5 validation errors on Demo site Fix #1197 --- layouts/partials/site_head.html | 3 ++- layouts/shortcodes/figure.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/partials/site_head.html b/layouts/partials/site_head.html index 29c6a6be..189f8443 100644 --- a/layouts/partials/site_head.html +++ b/layouts/partials/site_head.html @@ -95,8 +95,9 @@ {{ end }} {{/* We cannot use SRI with Google Fonts because the CSS is dynamically generated according to the user agent. */}} + {{/* Hugo's htmlEscape cannot escape "|" in Google Font URIs so we implement our own escape functionality. */}} {{ with ($scr.Get "google_fonts") }} - + {{ end }} {{ $css_options := (dict "targetPath" "css/academic.css" "outputStyle" "compressed") }} diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 6e454624..95dcdcab 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -12,7 +12,7 @@ {{ else if .Get "link"}} {{ end }} - +{{ if or (.Get {{ if or $lightbox (.Get "link") }}{{ end }} {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} {{ $figure := split (i18n "figure" | default "Figure %d:") "%d" }}