Mike Slinn
Mike Slinn

jekyll_download_link

Published 2020-10-03. Last modified 2023-05-18.
Time to read: 1 minutes.

This page is part of the jekyll_plugins collection, categorized under Jekyll.

This plugin generates a link to the given URI, which must be a file on the server. The path can be absolute or relative to the top-level directory of the website.

Installation

Add the following highlighted line to your Jekyll project's Gemfile, within the jekyll_plugins group:

Gemfile
group :jekyll_plugins do 
  gem 'jekyll_download_link'
end 

And then execute:

Shell
$ bundle
{% download_link uri %}
{% download_link cloud9.tar %}

Generates:

<a href="/cloud9.tar"><code>cloud9.tar</code></a> (4.5 KB)

Which renders as: cloud9.tar (4.5 KB)