diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-08-01 18:12:36 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-08-03 20:00:57 +0200 |
commit | ade7ec818798c0e5507d4fb6cc5b4396262a85d6 (patch) | |
tree | fe1e2e18922b20286113d66e171dfecc861d30ff /hugolib/shortcode_test.go | |
parent | 8fa8ce3e48c8812daa1eecc8865b653336d98147 (diff) |
Add Page.RenderShortcodes
A layouts/shortcodes/include.html shortcode may look like this:
```html
{{ $p := site.GetPage (.Get 0) }}
{{ $p.RenderShortcodes }}
```
Fixes #7297
Diffstat (limited to 'hugolib/shortcode_test.go')
-rw-r--r-- | hugolib/shortcode_test.go | 24 |
1 files changed, 10 insertions, 14 deletions
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() |