Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boyvanamstel/jekyll-copyr
A Jekyll plugin to easily copy files from anywhere into your site.
https://github.com/boyvanamstel/jekyll-copyr
jekyll jekyll-plugin
Last synced: about 2 months ago
JSON representation
A Jekyll plugin to easily copy files from anywhere into your site.
- Host: GitHub
- URL: https://github.com/boyvanamstel/jekyll-copyr
- Owner: boyvanamstel
- License: mit
- Created: 2020-03-21T13:07:36.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-06T10:13:05.000Z (about 2 years ago)
- Last Synced: 2024-10-31T15:18:37.540Z (about 2 months ago)
- Topics: jekyll, jekyll-plugin
- Language: Ruby
- Homepage:
- Size: 20.5 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Jekyll Copyr
[![Gem Version](https://badge.fury.io/rb/jekyll-copyr.svg)](https://badge.fury.io/rb/jekyll-copyr)
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`:
```ruby
# Gemfilegroup :jekyll_plugins do
gem "jekyll-copyr"
end
```Then add these lines to your application's `_config.yml`:
```yml
# _config.ymlplugins:
- jekyll-copyrjekyll-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](https://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](https://opensource.org/licenses/MIT).