custom_update_tags 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/update_tags.rb +9 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 137c74328662ed0111ef7ec7c808ac2589953a70106143f02bef2437d6340e21
4
- data.tar.gz: d6e9f3875bebc72b09e4c7ce0ec78859e7942a9e35179627e9f4fdbbddc3ab4e
3
+ metadata.gz: 518a32e3e88c3fe35f8e50820b6d64e141fab62b78a0aea73832d669c735e7db
4
+ data.tar.gz: a35d963f10c47bdbedde3931db560c943c06a74c30451e2ac3ba789cc6c8a322
5
5
  SHA512:
6
- metadata.gz: f1d8200b15bc48510fa3b28b631ab8c712259a9d9acd1ff4d9802004d53942a9ec440d2cdb90e569393436fb587de7d79fd2ca76f35974572f75085a790fed32
7
- data.tar.gz: bdd27c290bcb1a055cef16a2d18e5c9925ebacb4718ae9ae04a06a2e9fcbfdb2d37b940056f6daf603713f1be7e75da052b155faea08b811d028a9566ce25235
6
+ metadata.gz: ab294372f0fd0d513b3edc7d6c4658df237becc4b8c8656c71137b8ebe65d5fb291fe929042fe9dbfc2bbc1b70f4d8d668b26524010ed23db8d4c50a5238d22a
7
+ data.tar.gz: fd1dbb56853a958728ccc9236b26cc1d083ff16585e0a5108bfbe999a2f6b160f9e2234b5a205eaa69c5855ecb191756d5e3e9eedf6eb779e0c81fdf9056a25f
data/lib/update_tags.rb CHANGED
@@ -87,10 +87,15 @@ class UpdateTags
87
87
  <<~INJECTED_LIQUID
88
88
  {% assign tag = "#{tag}" %}
89
89
  {% assign tagged_posts = "" | split: "" %}
90
- {% for post in site.posts %}
91
- {% if post.tags contains tag %}
92
- {% assign tagged_posts = tagged_posts | push: post %}
93
- {% endif %}
90
+ {% assign collections = 'posts,building,writing,notes,misc' | split: ',' %}
91
+
92
+ {% for collection_name in collections %}
93
+ {% assign current_collection = site[collections] %}
94
+ {% for post in current_collection %}
95
+ {% if post.tags contains tag %}
96
+ {% assign tagged_posts = tagged_posts | push: post %}
97
+ {% endif %}
98
+ {% endfor %}
94
99
  {% endfor %}
95
100
  INJECTED_LIQUID
96
101
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: custom_update_tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Pachulski
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-04-09 00:00:00.000000000 Z
12
+ date: 2024-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor