Add Page.RenderShortcodes

A layouts/shortcodes/include.html shortcode may look like this:

```html
{{ $p := site.GetPage (.Get 0) }}
{{ $p.RenderShortcodes }}
```

Fixes #7297
This commit is contained in:
Bjørn Erik Pedersen
2023-08-01 18:12:36 +02:00
parent 8fa8ce3e48
commit ade7ec8187
14 changed files with 434 additions and 89 deletions

View File

@@ -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()