hugo: refactor include shortcode mechanics

Instead of inserting the raw file contents, use the page object.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2024-08-15 21:41:27 +02:00
parent be79aba1b6
commit eb8614af4d
7 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,7 @@
---
cascade:
- build:
list: local
publishResources: false
render: never
---

View File

@ -1,3 +1,6 @@
---
---
{{% restricted title="Early Access" %}}
The Docker Admin Console is an [early access](/release-lifecycle#early-access-ea) product.

View File

@ -1,3 +1,6 @@
---
---
{{% restricted title="Early Access" %}}
Compose Bridge is an [Early Access](/release-lifecycle#early-access-ea) product.

View File

@ -1,3 +1,6 @@
---
---
{{% experimental %}}
The "labs" channel provides early access to Dockerfile features that are not
yet available in the stable channel.

View File

@ -175,6 +175,7 @@
"border-l-2",
"border-l-4",
"border-l-magenta-light",
"border-red-light",
"border-violet-light",
"bottom-0",
"box-content",
@ -212,6 +213,7 @@
"dark:border-gray-dark-400",
"dark:border-green-dark",
"dark:border-l-magenta-dark",
"dark:border-red-dark",
"dark:border-violet-dark",
"dark:decoration-blue-dark",
"dark:fill-blue-dark",
@ -237,6 +239,7 @@
"dark:text-gray-dark-800",
"dark:text-green-dark",
"dark:text-magenta-dark",
"dark:text-red-dark",
"dark:text-violet-dark",
"dark:text-white",
"dark:to-blue-dark-100",
@ -463,6 +466,7 @@
"text-left",
"text-lg",
"text-magenta-light",
"text-red-light",
"text-sm",
"text-violet-light",
"text-white",

View File

@ -1,2 +1,4 @@
{{ $fileToInclude := .Get 0 }}
{{ os.ReadFile (printf "includes/%s" $fileToInclude) | page.RenderString }}
{{ with (site.GetPage (printf "includes/%s" $fileToInclude)) }}
{{ page.RenderString (dict "display" "block") .RenderShortcodes }}
{{ end }}