Skip to content

Commit b619ed2

Browse files
committed
hugo: improve shortcode rendering for markdown output
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
1 parent 9c6d4cb commit b619ed2

15 files changed

Lines changed: 57 additions & 0 deletions

hugo.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ outputs:
9292
section:
9393
- html
9494
- markdown
95+
taxonomy:
96+
- html
97+
term:
98+
- html
9599

96100
languages:
97101
en:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{ $title := .Get "title" -}}
2+
{{ $body := .InnerDeindent -}}
3+
**{{ $title }}**
4+
5+
{{ $body }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{ $text := .Get "text" }}\[{{ $text }}\]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{ $text := .Get "text" -}}
2+
{{ $url := .Get "url" -}}
3+
[{{ $text }}]({{ $url }})
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{/* Card omitted from markdown output */}}

layouts/shortcodes/cta.markdown.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{/* CTA omitted from markdown output */}}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{- $all := .Get "all" -}}
2+
{{- $win := .Get "win" -}}
3+
{{- $win_arm_release := .Get "win_arm_release" -}}
4+
{{- $mac := .Get "mac" -}}
5+
{{- $linux := .Get "linux" -}}
6+
{{- $build_path := .Get "build_path" -}}
7+
Download Docker Desktop:
8+
{{- if or $all $win }}
9+
- [Windows](https://desktop.docker.com/win/main/amd64{{ $build_path }}Docker%20Desktop%20Installer.exe)
10+
{{- end }}
11+
{{- if $win_arm_release }}
12+
- [Windows ARM {{ $win_arm_release }}](https://desktop.docker.com/win/main/arm64{{ $build_path }}Docker%20Desktop%20Installer.exe)
13+
{{- end }}
14+
{{- if or $all $mac }}
15+
- [Mac (Apple chip)](https://desktop.docker.com/mac/main/arm64{{ $build_path }}Docker.dmg)
16+
- [Mac (Intel chip)](https://desktop.docker.com/mac/main/amd64{{ $build_path }}Docker.dmg)
17+
{{- end }}
18+
{{- if or $all $linux }}
19+
- [Linux (Debian)](https://desktop.docker.com/linux/main/amd64{{ $build_path }}docker-desktop-amd64.deb)
20+
- [Linux (RPM)](https://desktop.docker.com/linux/main/amd64{{ $build_path }}docker-desktop-x86_64.rpm)
21+
- [Linux (Arch)](https://desktop.docker.com/linux/main/amd64{{ $build_path }}docker-desktop-x86_64.pkg.tar.zst)
22+
{{- end }}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> **{{ .Get "title" | default (i18n "experimental") }}**
2+
>
3+
> {{ .InnerDeindent }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{/* Grid omitted from markdown output */}}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{ $src := .Get "src" }}
2+
{{ $alt := .Get "alt" }}
3+
{{ $title := .Get "title" }}
4+
![{{ $alt }}]({{ $src }}{{ with $title }} "{{ . }}"{{ end }})

0 commit comments

Comments
 (0)