diff --git a/layouts/shortcodes/download.html b/layouts/shortcodes/download.html new file mode 100644 index 0000000..5ab88dd --- /dev/null +++ b/layouts/shortcodes/download.html @@ -0,0 +1,12 @@ +{{ $file:= .Get "file" }} +{{ if not (resources.Get $file) }} + {{ errorf "Error: 'file' is a required parameter." }} +{{ end }} + + {{- with .Get "message" -}} +

{{- . -}}

+ {{- end -}} + + {{- with resources.Get $file -}} + Download {{ path.Ext $file }} + {{- end -}}