vanilla-hugo/layouts/shortcodes/draftlink.html
Danila Fedorin 8c3d93bc2d Add a 'draft link' shortcode
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-07-06 17:25:02 -07:00

7 lines
192 B
HTML

{{- $page := site.GetPage (.Get 1) -}}
{{- if $page -}}
<a href="{{ $page.RelPermalink }}">{{ .Get 0 }}</a>
{{- else -}}
<span class="draft-link">{{ .Get 0 }} (coming soon)</span>
{{- end -}}