Skip to content

Commit 325ba87

Browse files
author
Tim Bannister
committed
Warn on use of capture shortcode
If anyone uses the capture shortcode, emit a warning. The website no longer uses capture shortcodes.
1 parent 30b8110 commit 325ba87

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

layouts/shortcodes/capture.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
{{- if not $id -}}
44
{{- errorf "missing id in capture" -}}
55
{{- end -}}
6-
{{- $capture_id := printf "__cid_%s" $id -}}
7-
{{- .Page.Scratch.Set $capture_id .Inner -}}
6+
{{- $capture_id := printf "capture %s" $id -}}
7+
{{- .Page.Scratch.Set $capture_id .Inner -}}
8+
{{ warnf "Invalid shortcode: %s, in %q" $capture_id (relLangURL .Page.Path) }}

0 commit comments

Comments
 (0)