jekyll-theme-amethyst 2.8.2 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/sidebar.html +2 -1
- data/_layouts/posts-archive.html +1 -0
- data/lib/jekyll-theme-amethyst.rb +32 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca4cf34c837bf78fa4612807de42f6549e7345c72364d0319d5fbc3a4cee881b
|
4
|
+
data.tar.gz: 4c27963060c6e4898af6279008e90085b16571a0ffe4f8c872ebc858b300282c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b74f88c0c331ec97d000f4f4a393f14eb314d998076061e68589e8ee3065bac74064397322d7d6bcacb6a3dd8f1264f2be5ee17fcdfc6f88971898d38a8d7c4d
|
7
|
+
data.tar.gz: 3adc902f6ba37da2c62dac0337e8585086a724db6adf1d297bc5b22f636fb3615cb45c0d1cd994d2091a8ba8c6fc3fd1872f9929644dd8d098342c3f72aedecd
|
data/_includes/sidebar.html
CHANGED
@@ -73,7 +73,8 @@ Block data:
|
|
73
73
|
{%- elsif block_type == "recent" -%}
|
74
74
|
{%- assign group_page = site.pages | where: "layout", "posts" | first -%}
|
75
75
|
{%- assign block_url = block.url | default: group_page.url -%}
|
76
|
-
{%- assign
|
76
|
+
{%- assign tags_excluded = site.pages | where: "layout", "posts-tag" | where: "amethyst.exclude_tag_from_recent", true | map: "tag" %}
|
77
|
+
{%- assign block_contents = site.posts | reject_include: "tags", tags_excluded | slice: 0, 5 -%}
|
77
78
|
{%- elsif block_type == "archive" -%}
|
78
79
|
{%- assign block_contents = site.pages | where: "layout", "posts-year" | sort_natural: 'date' | reverse -%}
|
79
80
|
{%- assign group_page = site.pages | where: "layout", "posts-archive" | first -%}
|
data/_layouts/posts-archive.html
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
require "digest"
|
2
|
+
require "set"
|
3
|
+
|
1
4
|
# The "file_version_query" Liquid filter appends a query parameter with a file hash.
|
2
5
|
#
|
3
6
|
# Example: Basic
|
@@ -16,9 +19,29 @@
|
|
16
19
|
# <link href="/assets/style.css?v=01234567">
|
17
20
|
# ```
|
18
21
|
#
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
+
# The "reject_include" Liquid filter applies to an iterable collection of items
|
23
|
+
# that may have a given `property` with an array as value. It removes items
|
24
|
+
# where `property` contains one or more values from `values`.
|
25
|
+
#
|
26
|
+
# This is similar to the built-in "where" filter, except negated, and for array
|
27
|
+
# properties rather than string properties.
|
28
|
+
#
|
29
|
+
# Example: Exclude posts where "tags" contains an excluded tag
|
30
|
+
#
|
31
|
+
# ```
|
32
|
+
# tags_excluded = [ "foo", "bar" ]
|
33
|
+
# posts = [
|
34
|
+
# { id: 1 }, // property may not exist
|
35
|
+
# { id: 2, tags: [ "quux" ] }, // property does not include "foo" or "bar"
|
36
|
+
# { id: 2, tags: [ "quux", "bar" ] // rejected
|
37
|
+
# }
|
38
|
+
# filtered = posts | reject_include: "tags", tags_excluded
|
39
|
+
#
|
40
|
+
# filtered === [
|
41
|
+
# { id: 1 },
|
42
|
+
# { id: 2, tags: [ "quux" ] }
|
43
|
+
# }
|
44
|
+
# ```
|
22
45
|
module Jekyll
|
23
46
|
module AmethystFilters
|
24
47
|
def file_version_query(input, *filenames)
|
@@ -34,6 +57,12 @@ module Jekyll
|
|
34
57
|
hex = hexes.length > 1 ? Digest::MD5.hexdigest(hexes.join(" ")) : hexes[0]
|
35
58
|
"#{input}?v=#{hex[0..7]}"
|
36
59
|
end
|
60
|
+
def reject_include(input, property, values)
|
61
|
+
ary = Liquid::StandardFilters::InputIterator.new(input)
|
62
|
+
ary.reject do |item|
|
63
|
+
values.intersect? item[property]
|
64
|
+
end
|
65
|
+
end
|
37
66
|
end
|
38
67
|
end
|
39
68
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-amethyst
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timo Tijhof
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-10-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jekyll
|