Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakubpawlowicz/jekyll-simple-assets
Simple Jekyll assets bundling
https://github.com/jakubpawlowicz/jekyll-simple-assets
css javascript jekyll jekyll-assets jekyll-plugin jekyll-plugins
Last synced: about 1 month ago
JSON representation
Simple Jekyll assets bundling
- Host: GitHub
- URL: https://github.com/jakubpawlowicz/jekyll-simple-assets
- Owner: jakubpawlowicz
- License: mit
- Created: 2016-06-11T06:28:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-23T06:27:01.000Z (almost 8 years ago)
- Last Synced: 2024-12-15T20:51:55.764Z (about 1 month ago)
- Topics: css, javascript, jekyll, jekyll-assets, jekyll-plugin, jekyll-plugins
- Language: Ruby
- Size: 29.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# jekyll-simple-assets
It's a simple [Jekyll](http://jekyllrb.com/) plugin for building production-ready assets. It **does not** support asset
bundling as in HTTP/2 world it's considered a __bad practice__.## How to install it?
Copy assets.rb into your _plugins folder. Then make sure `uglifyjs` and `cleancss` binaries are
in $PATH, or customize assets.rb to use JS and CSS optimization tools of your choice.**Note**: if you end up customizing assets.rb it's a __good practice__ to fork this repository and
put your edited assets.rb there so you can track changes.## How to use it inside HTML?
```html
```
## How to use it inside CSS?
There is no need to change anything as all `url()` declarations will be rewritten automatically.
## How to inline assets inside HTML?
Well, server push is still not widely supported (as of June 2016), so here's how:
```html
{% asset_inline /path/to/my.css %}
```## How to see more detailed logs?
Use `--verbose` flag which changes Jekyll log level to `debug`. In debug mode all optimizations are displayed in a build log.
## Why it's not published as a gem?
Because I'm lazy and it would make customizations harder.
You can always download the current version with curl:
```shell
curl https://raw.githubusercontent.com/jakubpawlowicz/jekyll-simple-assets/v2.0.1/assets.rb -o _plugins/assets.rb && (echo "d0ac7abcdfcc5321a57d36f4c30353efd83330e5 _plugins/assets.rb" | shasum -c -)
```## Why doesn't it support feature X?
Pull requests are welcome!
## License
jekyll-simple-assets is released under the [MIT License](https://github.com/jakubpawlowicz/jekyll-simple-assets/blob/master/LICENSE).