Skip to content

Commit 6a6ce10

Browse files
authored
Ensure that spec_status shortcode fails softly (#5556)
1 parent e7c30e9 commit 6a6ce10

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

layouts/shortcodes/spec_status.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{{ end -}}
77
{{ $page := .Site.GetPage $pageRef -}}
88
{{ if not $page -}}
9-
{{ errorf "spec_status: Can't find page at '%s'." $pageRef -}}
9+
{{ warnf "spec_status: Can't find page at '%s'." $pageRef -}}
1010
{{ end -}}
1111

1212
{{ $_match := .Get 2 | default "Status" -}}
@@ -17,7 +17,7 @@
1717
{{/* Note that content is in HTML. */ -}}
1818
{{ $statusLine = index . 0 -}}
1919
{{ else -}}
20-
{{ errorf "%s: page '%s' does not contain a line matching '%s'." $err $pageRef $_match -}}
20+
{{ warnf "%s: page '%s' does not contain a line matching '%s'." $err $pageRef $_match -}}
2121
{{ end -}}
2222

2323
{{ $status := "" -}}
@@ -30,7 +30,8 @@
3030
{{ with findRE $statusRE $statusLine -}}
3131
{{ $status = index . 0 -}}
3232
{{ else -}}
33-
{{ errorf "%s: '%s' value did not match one of '%s' in file '%s': matched line is '%s'" $err $_match $statusValueRE $pageRef $statusLine -}}
33+
{{ warnf "%s: '%s' value did not match one of '%s' in file '%s': matched line is '%s'" $err $_match $statusValueRE $pageRef $statusLine -}}
34+
{{ $status = "[STATUS ACCESS FAILURE DURING SITE BUILD]" -}}
3435
{{ end -}}
3536

3637
**[{{ $label }}]({{ $page.RelPermalink }}):** {{ lower $status -}}

0 commit comments

Comments
 (0)