hugo: improve shortcode rendering for markdown output

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson
2026-01-12 13:02:07 +01:00
parent 9c6d4cb22e
commit b619ed27d3
15 changed files with 57 additions and 0 deletions

View File

@@ -92,6 +92,10 @@ outputs:
section:
- html
- markdown
taxonomy:
- html
term:
- html
languages:
en:

View File

@@ -0,0 +1,5 @@
{{ $title := .Get "title" -}}
{{ $body := .InnerDeindent -}}
**{{ $title }}**
{{ $body }}

View File

@@ -0,0 +1 @@
{{ $text := .Get "text" }}\[{{ $text }}\]

View File

@@ -0,0 +1,3 @@
{{ $text := .Get "text" -}}
{{ $url := .Get "url" -}}
[{{ $text }}]({{ $url }})

View File

@@ -0,0 +1 @@
{{/* Card omitted from markdown output */}}

View File

@@ -0,0 +1 @@
{{/* CTA omitted from markdown output */}}

View File

@@ -0,0 +1,22 @@
{{- $all := .Get "all" -}}
{{- $win := .Get "win" -}}
{{- $win_arm_release := .Get "win_arm_release" -}}
{{- $mac := .Get "mac" -}}
{{- $linux := .Get "linux" -}}
{{- $build_path := .Get "build_path" -}}
Download Docker Desktop:
{{- if or $all $win }}
- [Windows](https://desktop.docker.com/win/main/amd64{{ $build_path }}Docker%20Desktop%20Installer.exe)
{{- end }}
{{- if $win_arm_release }}
- [Windows ARM {{ $win_arm_release }}](https://desktop.docker.com/win/main/arm64{{ $build_path }}Docker%20Desktop%20Installer.exe)
{{- end }}
{{- if or $all $mac }}
- [Mac (Apple chip)](https://desktop.docker.com/mac/main/arm64{{ $build_path }}Docker.dmg)
- [Mac (Intel chip)](https://desktop.docker.com/mac/main/amd64{{ $build_path }}Docker.dmg)
{{- end }}
{{- if or $all $linux }}
- [Linux (Debian)](https://desktop.docker.com/linux/main/amd64{{ $build_path }}docker-desktop-amd64.deb)
- [Linux (RPM)](https://desktop.docker.com/linux/main/amd64{{ $build_path }}docker-desktop-x86_64.rpm)
- [Linux (Arch)](https://desktop.docker.com/linux/main/amd64{{ $build_path }}docker-desktop-x86_64.pkg.tar.zst)
{{- end }}

View File

@@ -0,0 +1,3 @@
> **{{ .Get "title" | default (i18n "experimental") }}**
>
> {{ .InnerDeindent }}

View File

@@ -0,0 +1 @@
{{/* Grid omitted from markdown output */}}

View File

@@ -0,0 +1,4 @@
{{ $src := .Get "src" }}
{{ $alt := .Get "alt" }}
{{ $title := .Get "title" }}
![{{ $alt }}]({{ $src }}{{ with $title }} "{{ . }}"{{ end }})

View File

@@ -0,0 +1,3 @@
> **{{ .Get "title" | default (i18n "restricted") }}**
>
> {{ .InnerDeindent }}

View File

@@ -0,0 +1 @@
{{/* RSS button omitted from markdown output */}}

View File

@@ -0,0 +1 @@
{{/* Summary bar omitted from markdown output */}}

View File

@@ -0,0 +1,6 @@
{{ with .Inner }}{{/* don't do anything, just call it */}}{{ end -}}
{{ range (.Store.Get "tabs") -}}
**{{ .name }}**
{{ .content }}
{{- end -}}

View File

@@ -0,0 +1 @@
{{/* YouTube embed omitted from markdown output */}}