Module: Jekyll
- Defined in:
- lib/jekyll-theme-amethyst.rb,
lib/jekyll-theme-amethyst.rb
Overview
The "file_version_query" Liquid filter appends a query parameter with a file hash.
Example: Basic
```
<img src="{{ "/assets/foo.png" | file_version_query | relative_url }}">
```
```
<img src="/assets/foo.png?v=01234567">
```
Example: Link to a generated file that may not yet exist, and hash its input files instead.
```
<link href="{{ "/assets/style.css" | file_version_query: "/_sass/x.scss", "/_sass/y.scss" }}">
<link href="/assets/style.css?v=01234567">
```
The "reject_include" Liquid filter applies to an iterable collection of items
that may have a given property with an array as value. It removes items
where property contains one or more values from values.
This is similar to the built-in "where" filter, except negated, and for array properties rather than string properties.
Example: Exclude posts where "tags" contains an excluded tag
```
tags_excluded = [ "foo", "bar" ]
posts = [
{ id: 1 }, // property may not exist
{ id: 2, tags: [ "quux" ] }, // property does not include "foo" or "bar"
{ id: 2, tags: [ "quux", "bar" ] // rejected
}
filtered = posts | reject_include: "tags", tags_excluded
filtered === [
{ id: 1 },
{ id: 2, tags: [ "quux" ] }
}
```
Defined Under Namespace
Modules: AmethystFilters, AmethystPlugin