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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b357f72cda3418e1832098361ccb824d09cda946e142527fa2c3cef34f421a3
4
- data.tar.gz: 5c45908996f3d7c95052a5855479bf6843710e1bb14361e2378433e594f000e8
3
+ metadata.gz: ca4cf34c837bf78fa4612807de42f6549e7345c72364d0319d5fbc3a4cee881b
4
+ data.tar.gz: 4c27963060c6e4898af6279008e90085b16571a0ffe4f8c872ebc858b300282c
5
5
  SHA512:
6
- metadata.gz: '088f6785be6ae87b965c74f64e36ae19b180ae373495a01b254ee180a39bc617e7be62893fdadf6f98739374caba4d585c6f00157a02e780ee0ce8e133e35c92'
7
- data.tar.gz: 3123070b586081e160c93d072f583fc2101d6b133f08be5204076c34c1a24edea229ad5da272f992a3a37c5c45290ba76af89b5a53de080dda60eb268fac0130
6
+ metadata.gz: b74f88c0c331ec97d000f4f4a393f14eb314d998076061e68589e8ee3065bac74064397322d7d6bcacb6a3dd8f1264f2be5ee17fcdfc6f88971898d38a8d7c4d
7
+ data.tar.gz: 3adc902f6ba37da2c62dac0337e8585086a724db6adf1d297bc5b22f636fb3615cb45c0d1cd994d2091a8ba8c6fc3fd1872f9929644dd8d098342c3f72aedecd
@@ -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 block_contents = site.posts | slice: 0, 5 -%}
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 -%}
@@ -10,6 +10,7 @@ amethyst:
10
10
  {%- assign prev_year = false -%}
11
11
  <div class="posts content">
12
12
  <h1>{{ page.title }}</h1>
13
+ {{ content }}
13
14
  {% for post in posts -%}
14
15
  {%- assign post_year = post.date | date: '%Y' -%}
15
16
  {%- if post_year != prev_year -%}
@@ -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
- require "digest"
20
- require "set"
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.8.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-04-03 00:00:00.000000000 Z
12
+ date: 2025-10-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll