The project is in a healthy, maintained state
Provides a Jekyll tag that generates an href to a file for the user to download, plus human-friendly filesize.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

jekyll_download_link Gem Version

jekyll_download_link is a Jekyll tag plugin that generates a link to the given URI, which must be a file on the server. The file name can be absolute or relative to the top-level directory of the website.

Usage

{% 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)

Installation

Add this line to your application's Gemfile:

gem 'jekyll_download_link'

And then execute:

$ bundle install

Additional Information

More information is available on Mike Slinn’s website.

Development

After checking out the repo, run bin/setup to install dependencies.

You can also run bin/console for an interactive prompt that will allow you to experiment.

Build and Install Locally

To build and install this gem onto your local machine, type:

$ bundle exec rake install
jekyll_download_link 1.0.0 built to pkg/jekyll_download_link-0.1.0.gem.
jekyll_download_link (1.0.0) installed.

Examine the newly built gem:

$ gem info jekyll_download_link

*** LOCAL GEMS ***

jekyll_download_link (1.0.0)
    Author: Mike Slinn
    Homepage:
    https://github.com/mslinn/jekyll_download_link
    License: MIT
    Installed at: /home/mslinn/.gems

    Generates Jekyll logger with colored output.

Demo Website

A test/demo website is provided in the demo directory. You can run it under a debugger, or let it run free.

The demo/_bin/debug script can set various parameters for the demo. View the help information with the -h option:

$ demo/_bin/debug -h

debug - Run the demo Jekyll website.

By default the demo Jekyll website runs without restriction under ruby-debug-ide and debase.
View it at http://localhost:4444

Options:
  -h  Show this error message

  -r  Run freely, without a debugger

Debugging the Demo

To run under a debugger, for example Visual Studio Code:

  1. Set breakpoints.

  2. Initiate a debug session from the command line:

    $ demo/bin/debug
  3. Once the Fast Debugger signon appears, launch the Visual Studio Code launch configuration called Attach rdebug-ide.

  4. View the generated website at http://localhost:4444.

Build and Push to RubyGems

To release a new version,

  1. Update the version number in version.rb.

  2. Commit all changes to git; if you don't the next step might fail with an unexplainable error message.

  3. Run the following:

    $ bundle exec rake release

    The above creates a git tag for the version, commits the created tag, and pushes the new .gem file to RubyGems.org.

Contributing

  1. Fork the project
  2. Create a descriptively named feature branch
  3. Add your feature
  4. Submit a pull request

License

The gem is available as open source under the terms of the MIT License.