Add full path to error messages

master
Will Faught 2 years ago
parent 313370e91c
commit 5359a3d1fa

@ -12,7 +12,7 @@
{{ $outputstyle := cond hugo.IsProduction "compressed" "" }} {{ $outputstyle := cond hugo.IsProduction "compressed" "" }}
{{ if not $href }} {{ if not $href }}
{{ errorf "paige/link: no href" }} {{ errorf "layouts/partials/paige/link.html: no href" }}
{{ end }} {{ end }}
{{ with partial "paige/resource.html" $href }} {{ with partial "paige/resource.html" $href }}

@ -20,7 +20,7 @@
{{ else if eq . "underline" }} {{ else if eq . "underline" }}
{{ $underline = true }} {{ $underline = true }}
{{ else if ne . "links" }} {{ else if ne . "links" }}
{{ errorf "paige/menu: invalid menu style: %q" . }} {{ errorf "layouts/partials/paige/menu.html: invalid menu style: %q" . }}
{{ end }} {{ end }}
{{ else }} {{ else }}
{{ $pills = true }} {{ $pills = true }}

@ -5,7 +5,7 @@
{{ if (urls.Parse $url).Scheme }} {{ if (urls.Parse $url).Scheme }}
{{ with resources.GetRemote $url }} {{ with resources.GetRemote $url }}
{{ with .Err }} {{ with .Err }}
{{ errorf "paige/resource: cannot get remote resource %q: %v" $url . }} {{ errorf "layouts/partials/paige/resource.html: cannot get remote resource %q: %v" $url . }}
{{ else }} {{ else }}
{{ $result = . }} {{ $result = . }}
{{ end }} {{ end }}

@ -9,7 +9,7 @@
{{ $type := $params.type }} {{ $type := $params.type }}
{{ if not $src }} {{ if not $src }}
{{ errorf "paige/script: no src" }} {{ errorf "layouts/partials/paige/script.html: no src" }}
{{ end }} {{ end }}
{{ with partial "paige/resource.html" $src }} {{ with partial "paige/resource.html" $src }}

@ -3,7 +3,7 @@
{{ $options := .Get "options" }} {{ $options := .Get "options" }}
{{ if not $content }} {{ if not $content }}
{{ errorf "paige/code: no content" }} {{ errorf "layouts/shortcodes/paige/code.html: no content" }}
{{ end }} {{ end }}
<div class="paige-code">{{ highlight $content $lang $options }}</div> <div class="paige-code">{{ highlight $content $lang $options }}</div>

@ -9,7 +9,7 @@
{{ $width := .Get "width" }} {{ $width := .Get "width" }}
{{ if not $content }} {{ if not $content }}
{{ errorf "paige/figure: no content" }} {{ errorf "layouts/shortcodes/paige/figure.html: no content" }}
{{ end }} {{ end }}
{{ $showcaption := $caption }} {{ $showcaption := $caption }}
@ -37,7 +37,7 @@
{{ else if eq $float "end" }} {{ else if eq $float "end" }}
{{ $sidemargin = "ms-4" }} {{ $sidemargin = "ms-4" }}
{{ else }} {{ else }}
{{ errorf "paige/figure: invalid float: %q" $float }} {{ errorf "layouts/shortcodes/paige/figure.html: invalid float: %q" $float }}
{{ end }} {{ end }}
{{ end }} {{ end }}

@ -15,7 +15,7 @@
{{ $resources := slice }} {{ $resources := slice }}
{{ if and (not $images) (not $inner) }} {{ if and (not $images) (not $inner) }}
{{ errorf "paige/gallery: no content" }} {{ errorf "layouts/shortcodes/paige/gallery.html: no content" }}
{{ end }} {{ end }}
{{ if not $inner }} {{ if not $inner }}
@ -80,6 +80,6 @@
{{ end }} {{ end }}
</div> </div>
{{ else }} {{ else }}
{{ errorf "paige/gallery: invalid type: %q" $type }} {{ errorf "layouts/shortcodes/paige/gallery.html: invalid type: %q" $type }}
{{ end }} {{ end }}
</div> </div>

@ -3,7 +3,7 @@
{{ $url := .Get "url" }} {{ $url := .Get "url" }}
{{ if not $class }} {{ if not $class }}
{{ errorf "paige/icon: no class" }} {{ errorf "layouts/shortcodes/paige/icon.html: no class" }}
{{ end }} {{ end }}
<span class="paige-icon"> <span class="paige-icon">

@ -2,7 +2,7 @@
{{ $content := .Inner | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify }} {{ $content := .Inner | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify }}
{{ if not $content }} {{ if not $content }}
{{ errorf "paige/quote: no content" }} {{ errorf "layouts/shortcodes/paige/quote.html: no content" }}
{{ end }} {{ end }}
<div class="paige-quote"> <div class="paige-quote">

@ -27,7 +27,7 @@
{{ $width := .Get "width" }} {{ $width := .Get "width" }}
{{ if not $video }} {{ if not $video }}
{{ errorf "paige/vimeo: no video" }} {{ errorf "layouts/shortcodes/paige/vimeo.html: no video" }}
{{ end }} {{ end }}
{{ $params := slice }} {{ $params := slice }}

@ -15,7 +15,7 @@
{{ $width := .Get "width" }} {{ $width := .Get "width" }}
{{ if not $video }} {{ if not $video }}
{{ errorf "paige/youtube: no video" }} {{ errorf "layouts/shortcodes/paige/youtube.html: no video" }}
{{ end }} {{ end }}
{{ $host := cond site.Config.Privacy.YouTube.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" }} {{ $host := cond site.Config.Privacy.YouTube.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" }}

Loading…
Cancel
Save