diff --git a/tpl/tplimpl/embedded/templates/shortcodes/comment.html b/tpl/tplimpl/embedded/templates/shortcodes/comment.html index cb3293401..c35b5cad6 100644 --- a/tpl/tplimpl/embedded/templates/shortcodes/comment.html +++ b/tpl/tplimpl/embedded/templates/shortcodes/comment.html @@ -1 +1,2 @@ +{{- warnf "The %q shortcode was deprecated in v0.143.0 and will be removed in a future release. Please use HTML comments instead. See %s" .Name .Position -}} {{- $noop := .Inner -}} diff --git a/tpl/tplimpl/shortcodes_integration_test.go b/tpl/tplimpl/shortcodes_integration_test.go index d9c540cd9..7f560f53a 100644 --- a/tpl/tplimpl/shortcodes_integration_test.go +++ b/tpl/tplimpl/shortcodes_integration_test.go @@ -33,8 +33,9 @@ disableKinds = ['page','rss','section','sitemap','taxonomy','term'] a{{< comment >}}b{{< /comment >}}c ` - b := hugolib.Test(t, files) + b := hugolib.Test(t, files, hugolib.TestOptWarn()) b.AssertFileContent("public/index.html", "
ac
") + b.AssertLogContains(`WARN The "comment" shortcode was deprecated in v0.143.0 and will be removed in a future release. Please use HTML comments instead.`) } func TestDetailsShortcode(t *testing.T) {