mirror of
https://github.com/docker/docs.git
synced 2026-03-27 06:18:55 +07:00
hugo: improve shortcode rendering for markdown output
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
@@ -92,6 +92,10 @@ outputs:
|
||||
section:
|
||||
- html
|
||||
- markdown
|
||||
taxonomy:
|
||||
- html
|
||||
term:
|
||||
- html
|
||||
|
||||
languages:
|
||||
en:
|
||||
|
||||
5
layouts/shortcodes/accordion.markdown.md
Normal file
5
layouts/shortcodes/accordion.markdown.md
Normal file
@@ -0,0 +1,5 @@
|
||||
{{ $title := .Get "title" -}}
|
||||
{{ $body := .InnerDeindent -}}
|
||||
**{{ $title }}**
|
||||
|
||||
{{ $body }}
|
||||
1
layouts/shortcodes/badge.markdown.md
Normal file
1
layouts/shortcodes/badge.markdown.md
Normal file
@@ -0,0 +1 @@
|
||||
{{ $text := .Get "text" }}\[{{ $text }}\]
|
||||
3
layouts/shortcodes/button.markdown.md
Normal file
3
layouts/shortcodes/button.markdown.md
Normal file
@@ -0,0 +1,3 @@
|
||||
{{ $text := .Get "text" -}}
|
||||
{{ $url := .Get "url" -}}
|
||||
[{{ $text }}]({{ $url }})
|
||||
1
layouts/shortcodes/card.markdown.md
Normal file
1
layouts/shortcodes/card.markdown.md
Normal file
@@ -0,0 +1 @@
|
||||
{{/* Card omitted from markdown output */}}
|
||||
1
layouts/shortcodes/cta.markdown.md
Normal file
1
layouts/shortcodes/cta.markdown.md
Normal file
@@ -0,0 +1 @@
|
||||
{{/* CTA omitted from markdown output */}}
|
||||
22
layouts/shortcodes/desktop-install-v2.markdown.md
Normal file
22
layouts/shortcodes/desktop-install-v2.markdown.md
Normal 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 }}
|
||||
3
layouts/shortcodes/experimental.markdown.md
Normal file
3
layouts/shortcodes/experimental.markdown.md
Normal file
@@ -0,0 +1,3 @@
|
||||
> **{{ .Get "title" | default (i18n "experimental") }}**
|
||||
>
|
||||
> {{ .InnerDeindent }}
|
||||
1
layouts/shortcodes/grid.markdown.md
Normal file
1
layouts/shortcodes/grid.markdown.md
Normal file
@@ -0,0 +1 @@
|
||||
{{/* Grid omitted from markdown output */}}
|
||||
4
layouts/shortcodes/inline-image.markdown.md
Normal file
4
layouts/shortcodes/inline-image.markdown.md
Normal file
@@ -0,0 +1,4 @@
|
||||
{{ $src := .Get "src" }}
|
||||
{{ $alt := .Get "alt" }}
|
||||
{{ $title := .Get "title" }}
|
||||

|
||||
3
layouts/shortcodes/restricted.markdown.md
Normal file
3
layouts/shortcodes/restricted.markdown.md
Normal file
@@ -0,0 +1,3 @@
|
||||
> **{{ .Get "title" | default (i18n "restricted") }}**
|
||||
>
|
||||
> {{ .InnerDeindent }}
|
||||
1
layouts/shortcodes/rss-button.markdown.md
Normal file
1
layouts/shortcodes/rss-button.markdown.md
Normal file
@@ -0,0 +1 @@
|
||||
{{/* RSS button omitted from markdown output */}}
|
||||
1
layouts/shortcodes/summary-bar.markdown.md
Normal file
1
layouts/shortcodes/summary-bar.markdown.md
Normal file
@@ -0,0 +1 @@
|
||||
{{/* Summary bar omitted from markdown output */}}
|
||||
6
layouts/shortcodes/tabs.markdown.md
Normal file
6
layouts/shortcodes/tabs.markdown.md
Normal file
@@ -0,0 +1,6 @@
|
||||
{{ with .Inner }}{{/* don't do anything, just call it */}}{{ end -}}
|
||||
{{ range (.Store.Get "tabs") -}}
|
||||
**{{ .name }}**
|
||||
|
||||
{{ .content }}
|
||||
{{- end -}}
|
||||
1
layouts/shortcodes/youtube-embed.markdown.md
Normal file
1
layouts/shortcodes/youtube-embed.markdown.md
Normal file
@@ -0,0 +1 @@
|
||||
{{/* YouTube embed omitted from markdown output */}}
|
||||
Reference in New Issue
Block a user