File

Displays a file link with extention and size details.

Example

Usage

{{ $args := (dict
    "file" "videos/example-file.mp4"
    ) }}
{{ partial "commons/file" $args }}

HTML rendered

<a href="videos/example-file.mp4" download class="file">
  <span>
    <b>Example file</b>
    <abbr>MP4</abbr>
    15<abbr title="Megabytes">MB</abbr>
  </span>
</a>

Datas

file: "" // path file (required)
title: "" // custom title 
download: false // add download attribute to link, default is true