Skip to content

Commit eb8614a

Browse files
committed
hugo: refactor include shortcode mechanics
Instead of inserting the raw file contents, use the page object. Signed-off-by: David Karlsson <[email protected]>
1 parent be79aba commit eb8614a

File tree

7 files changed

+23
-1
lines changed

7 files changed

+23
-1
lines changed

content/includes/_index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
cascade:
3+
- build:
4+
list: local
5+
publishResources: false
6+
render: never
7+
---

content/includes/admin-early-access.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
---
3+
14
{{% restricted title="Early Access" %}}
25
The Docker Admin Console is an [early access](/release-lifecycle#early-access-ea) product.
36

content/includes/compose-bridge-early-access.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
---
3+
14
{{% restricted title="Early Access" %}}
25
Compose Bridge is an [Early Access](/release-lifecycle#early-access-ea) product.
36

content/includes/dockerfile-labs-channel.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
---
3+
14
{{% experimental %}}
25
The "labs" channel provides early access to Dockerfile features that are not
36
yet available in the stable channel.

content/includes/index.md

Whitespace-only changes.

hugo_stats.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@
175175
"border-l-2",
176176
"border-l-4",
177177
"border-l-magenta-light",
178+
"border-red-light",
178179
"border-violet-light",
179180
"bottom-0",
180181
"box-content",
@@ -212,6 +213,7 @@
212213
"dark:border-gray-dark-400",
213214
"dark:border-green-dark",
214215
"dark:border-l-magenta-dark",
216+
"dark:border-red-dark",
215217
"dark:border-violet-dark",
216218
"dark:decoration-blue-dark",
217219
"dark:fill-blue-dark",
@@ -237,6 +239,7 @@
237239
"dark:text-gray-dark-800",
238240
"dark:text-green-dark",
239241
"dark:text-magenta-dark",
242+
"dark:text-red-dark",
240243
"dark:text-violet-dark",
241244
"dark:text-white",
242245
"dark:to-blue-dark-100",
@@ -463,6 +466,7 @@
463466
"text-left",
464467
"text-lg",
465468
"text-magenta-light",
469+
"text-red-light",
466470
"text-sm",
467471
"text-violet-light",
468472
"text-white",

layouts/shortcodes/include.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
{{ $fileToInclude := .Get 0 }}
2-
{{ os.ReadFile (printf "includes/%s" $fileToInclude) | page.RenderString }}
2+
{{ with (site.GetPage (printf "includes/%s" $fileToInclude)) }}
3+
{{ page.RenderString (dict "display" "block") .RenderShortcodes }}
4+
{{ end }}

0 commit comments

Comments
 (0)