fix: HTML5 validation errors on Demo site

Fix #1197
This commit is contained in:
George Cushen committed 2019-09-11 17:25:12 +01:00
1 parent eacadc7935
commit c163931702
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -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") }}
<link rel="stylesheet" {{ printf "href=\"https://fonts.googleapis.com/css?family=%s&display=swap\"" (htmlEscape .) | safeHTMLAttr }}>
<link rel="stylesheet" {{ printf "href=\"https://fonts.googleapis.com/css?family=%s&display=swap\"" . | replaceRE "\\|" "%7C" | safeHTMLAttr }}>
{{ end }}
{{ $css_options := (dict "targetPath" "css/academic.css" "outputStyle" "compressed") }}
+1 -1
View File
@@ -12,7 +12,7 @@
{{ else if .Get "link"}}
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{.}}"{{ end }}{{ with .Get "rel" }} rel="{{.}}"{{ end }}>
{{ end }}
<img src="{{$image_src}}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}" {{ end }}{{ with .Get "width" }}width="{{.}}" {{ end }}{{ with .Get "height" }}height="{{.}}" {{ end }}>
<img src="{{$image_src}}" alt="{{ if or (.Get "alt") (.Get "caption") }}{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}{{ end }}" {{ with .Get "width" }}width="{{.}}" {{ end }}{{ with .Get "height" }}height="{{.}}" {{ end }}>
{{ if or $lightbox (.Get "link") }}</a>{{ end }}
{{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
{{ $figure := split (i18n "figure" | default "Figure %d:") "%d" }}