From 325ba8754aaa901f8184b2620f57f9070a80f043 Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Mon, 29 Jun 2020 18:54:30 +0100 Subject: [PATCH] Warn on use of capture shortcode If anyone uses the capture shortcode, emit a warning. The website no longer uses capture shortcodes. --- layouts/shortcodes/capture.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/capture.html b/layouts/shortcodes/capture.html index 6cb2e5a9c9..cc762273c3 100644 --- a/layouts/shortcodes/capture.html +++ b/layouts/shortcodes/capture.html @@ -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 -}} \ No newline at end of file +{{- $capture_id := printf "capture %s" $id -}} +{{- .Page.Scratch.Set $capture_id .Inner -}} +{{ warnf "Invalid shortcode: %s, in %q" $capture_id (relLangURL .Page.Path) }} \ No newline at end of file