README.md in jekyll-assets-3.0.2 vs README.md in jekyll-assets-3.0.3
- old
+ new
@@ -1,6 +1,11 @@
-[![Code Climate](https://img.shields.io/codeclimate/maintainability/envygeeks/jekyll-assets.svg?style=for-the-badge)](https://codeclimate.com/github/envygeeks/jekyll-assets/maintainability) [![Code Climate](https://img.shields.io/codeclimate/coverage/github/envygeeks/jekyll-assets.svg?style=for-the-badge)](https://codeclimate.com/github/envygeeks/jekyll-assets/test_coverage) [![Travis branch](https://img.shields.io/travis/envygeeks/jekyll-assets/master.svg?style=for-the-badge)](https://travis-ci.org/envygeeks/jekyll-assets) [![Donate](https://img.shields.io/badge/DONATE-USD-green.svg?style=for-the-badge)](https://envygeeks.io#donate) [![Gem](https://img.shields.io/gem/v/jekyll-assets.svg?style=for-the-badge)]()
+[![Code Climate](https://img.shields.io/codeclimate/maintainability/envygeeks/jekyll-assets.svg?style=for-the-badge)](https://codeclimate.com/github/envygeeks/jekyll-assets/maintainability)
+[![Code Climate](https://img.shields.io/codeclimate/coverage/github/envygeeks/jekyll-assets.svg?style=for-the-badge)](https://codeclimate.com/github/envygeeks/jekyll-assets/test_coverage)
+[![Travis CI](https://img.shields.io/travis/envygeeks/jekyll-assets/master.svg?style=for-the-badge)](https://travis-ci.org/envygeeks/jekyll-assets)
+[![Donate](https://img.shields.io/badge/-DONATE-yellow.svg?style=for-the-badge)](https://envygeeks.io#donate)
+![Gem Version](https://img.shields.io/gem/v/jekyll-assets.svg?style=for-the-badge)
+![Gem DL](https://img.shields.io/gem/dt/jekyll-assets.svg?style=for-the-badge)
# Jekyll Assets
Jekyll Assets is a drop in [asset pipeline](http://guides.rubyonrails.org/asset_pipeline.html) that uses [Sprockets](https://github.com/rails/sprockets) to build specifically for Jekyll. It utilizes [Sprockets](https://github.com/rails/sprockets), and [Jekyll](https://jekyllrb.com) to try and achieve a clean and extensible assets platform that supports plugins, caching, converting your assets, and even the proxy of said assets in a way that does not interfere with either [Sprockets](https://github.com/rails/sprockets), or [Jekyll](3), and your own source. By default you can add Jekyll Assets to your Gemfile, as a plugin, and have it act as a drop-in replacement for Jekyll's basic SASS/CoffeeScript processors, with you only having to add it to your Gemfile, and updating your `<img>`, and `<link>`.
@@ -29,11 +34,10 @@
## Configuration
The configuration file is the same as Jekyll's, which is `_config.yml`. Except we use the special key "assets" inside of that file. Any environment variable noted as "val on `JEKYLL_ENV`" is only overridden when not explicitly set. All values listed below are default, you need not copy these into your configuration file unless you plan to change a value.
```yaml
-digest: false
source_maps: true # false on JEKYLL_ENV=production
destination: "/assets"
compression: true
gzip: false
defaults:
@@ -42,15 +46,33 @@
img: { integrity: false } # true on JEKYLL_ENV=production
caching:
path: ".jekyll-cache/assets"
type: file # Possible values: memory, file
enabled: true
+# --
+# Assets you wish to always have compiled.
+# This can also be combined with raw_precompile which
+# copies assets without running through the pipeline
+# making them ultra fast.
+# --
precompile: []
+raw_precompile: [
+ #
+]
+# --
+# baseurl: whether or not to append site.baseurl
+# destination: the folder you store them in on the CDN.
+# url: the CDN url (fqdn, or w/ identifier).
+# --
cdn:
baseurl: false
destination: false
url: null
+# --
+# These are all default. No need to add them
+# Only use this if you have more.
+# --
sources:
- assets/css
- assets/fonts
- assets/images
- assets/videos
@@ -280,9 +302,56 @@
## Filter
```liquid
{{ src | asset:"@magick:2x magick:quality:92" }}
+```
+
+## Polymer WebComponents
+
+We have basic support for WebComponents when using Sprockets `~> 4.0.0.beta`, this will allow you to place your HTML in the `_assets/components` folder, `{% asset myComponent.html %}`, and get an import, you can place your regular JS files inside of the normal structure.
+
+### Example
+
+***test.html***
+
+```html
+<!DOCTYPE html>
+<html>
+ <head>
+ {% asset webcomponents.js %}
+ {% asset test.html %}
+ </head>
+ <body>
+ <contact-card starred>
+ {% asset profile.jpg %}
+ <span>Your Name</span>
+ </contact-card>
+ </body>
+</body>
+```
+
+***_assets/components/test.html***
+
+```html
+<dom-module id="contact-card">
+ <template>
+ <style>/* ... */</style>
+ <slot></slot>
+ <iron-icon icon="star" hidden$="{{!starred}}"></iron-icon>
+ </template>
+ <script>
+ class ContactCard extends Polymer.Element {
+ static get is() { return "contact-card"; }
+ static get properties() {
+ return {
+ starred: { type: Boolean, value: false }
+ }
+ }
+ }
+ customElements.define(ContactCard.is, ContactCard);
+ </script>
+</dom-module>
```
## Hooks
| Point | Name | Instance | Args |