From ade7ec818798c0e5507d4fb6cc5b4396262a85d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 1 Aug 2023 18:12:36 +0200 Subject: Add Page.RenderShortcodes A layouts/shortcodes/include.html shortcode may look like this: ```html {{ $p := site.GetPage (.Get 0) }} {{ $p.RenderShortcodes }} ``` Fixes #7297 --- hugolib/shortcode_test.go | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'hugolib/shortcode_test.go') diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go index 774794c56..6ee68673f 100644 --- a/hugolib/shortcode_test.go +++ b/hugolib/shortcode_test.go @@ -948,7 +948,6 @@ title: "p1" IntegrationTestConfig{ T: t, TxtarString: files, - Running: true, }, ).Build() @@ -991,7 +990,6 @@ title: "p1" IntegrationTestConfig{ T: t, TxtarString: files, - Running: true, }, ).Build() @@ -1023,7 +1021,6 @@ echo "foo"; IntegrationTestConfig{ T: t, TxtarString: files, - Running: true, }, ).Build() @@ -1061,7 +1058,6 @@ title: "p1" IntegrationTestConfig{ T: t, TxtarString: files, - Running: true, }, ).Build() @@ -1098,8 +1094,8 @@ Title: {{ .Get "title" | safeHTML }} IntegrationTestConfig{ T: t, TxtarString: files, - Running: true, - Verbose: true, + + Verbose: true, }, ).Build() @@ -1191,8 +1187,8 @@ C'est un test IntegrationTestConfig{ T: t, TxtarString: files, - Running: true, - Verbose: true, + + Verbose: true, }, ).Build() @@ -1229,8 +1225,8 @@ InnerDeindent: {{ .Get 0 }}: {{ len .InnerDeindent }} IntegrationTestConfig{ T: t, TxtarString: files, - Running: true, - Verbose: true, + + Verbose: true, }, ).Build() @@ -1269,8 +1265,8 @@ Inner: {{ .Get 0 }}: {{ len .Inner }} IntegrationTestConfig{ T: t, TxtarString: files, - Running: true, - Verbose: true, + + Verbose: true, }, ).BuildE() @@ -1306,8 +1302,8 @@ Hello. IntegrationTestConfig{ T: t, TxtarString: files, - Running: true, - Verbose: true, + + Verbose: true, }, ).Build() -- cgit v1.2.3