Warn on use of capture shortcode

If anyone uses the capture shortcode, emit a warning. The website
no longer uses capture shortcodes.
pull/22175/head
Tim Bannister 2020-06-29 18:54:30 +01:00
parent 30b8110eeb
commit 325ba8754a
1 changed files with 3 additions and 2 deletions

View File

@ -3,5 +3,6 @@
{{- if not $id -}}
{{- errorf "missing id in capture" -}}
{{- end -}}
{{- $capture_id := printf "__cid_%s" $id -}}
{{- .Page.Scratch.Set $capture_id .Inner -}}
{{- $capture_id := printf "capture %s" $id -}}
{{- .Page.Scratch.Set $capture_id .Inner -}}
{{ warnf "Invalid shortcode: %s, in %q" $capture_id (relLangURL .Page.Path) }}