Add option to configure portable links behaviour: off, error or warning
This commit is contained in:
@@ -13,7 +13,13 @@
|
||||
{{- else with (resources.Get $path) -}}
|
||||
{{- $destination = .RelPermalink -}}
|
||||
{{- else -}}
|
||||
{{- warnf "Image reference '%s' not found in '%s'" .Destination .Page.Permalink -}}
|
||||
{{- $mode := .Page.Site.Params.BookPortableLinks -}}
|
||||
{{- $message := printf "Image reference '%s' not found in '%s'" .Destination .Page.RelPermalink -}}
|
||||
{{- if eq $mode "warning" -}}
|
||||
{{- warnf $message -}}
|
||||
{{- else if eq $mode "error" -}}
|
||||
{{- errorf $message -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $url.RawQuery -}}
|
||||
|
||||
@@ -16,7 +16,13 @@
|
||||
{{- else with (resources.Get $path) -}}
|
||||
{{- $destination = .RelPermalink -}}
|
||||
{{- else -}}
|
||||
{{- warnf "Reference '%s' not found in '%s'" .Destination .Page.RelPermalink -}}
|
||||
{{- $mode := .Page.Site.Params.BookPortableLinks -}}
|
||||
{{- $message := printf "Image reference '%s' not found in '%s'" .Destination .Page.RelPermalink -}}
|
||||
{{- if eq $mode "warning" -}}
|
||||
{{- warnf $message -}}
|
||||
{{- else if eq $mode "error" -}}
|
||||
{{- errorf $message -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $url.RawQuery -}}
|
||||
|
||||
Reference in New Issue
Block a user