Skip to content

Latest commit

 

History

History
56 lines (34 loc) · 2 KB

README.md

File metadata and controls

56 lines (34 loc) · 2 KB

Jekyll Copyr

Gem Version

A Jekyll plugin that taps into FileUtils.cp_r from your _config.yml. Easily copy files from anywhere into your site.

Installation

Add gem "jekyll-copyr" to the :jekyll_plugins group in your Gemfile:

# Gemfile

group :jekyll_plugins do
  gem "jekyll-copyr"
end

Then add these lines to your application's _config.yml:

# _config.yml

plugins:
  - jekyll-copyr

jekyll-copyr:
  enabled: true # Optional, defaults to true
  tasks:
    - from: "./node_modules/@fortawesome/fontawesome-free/webfonts/."
      to: "./_site/assets/webfonts/"

Usage

Add the from and to path of the files you want to copy into the array below tasks. You can add as many tasks as you want. The task above copies all the webfonts from fontawesome into the _site directory.

Purpose

I've built this plugin to work around the need to ship my entire node_modules folder just to use some webfonts from Font Awesome.

You can also copy files from outside your project folder into your site. This allows you to share files between projects.

Development

After checking out the repo, run script/bootstrap to install dependencies. Then, run bundle exec rake spec to run the tests.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in lib/jekyll-copyr/version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/boyvanamstel/jekyll-copyr. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to behave appropriately.

License

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