cloudcannon-jekyll 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c513d1410254af59fed1d369d9852c77b0aa59474cf374f538a6557e5d0445f3
4
- data.tar.gz: bfdcbdf270b02d3ab9f5b8c869650f46c4f8eb06a73f30f821fbeb9611fe0480
3
+ metadata.gz: 7be8e0835f8eaa063ec3669eaf538951304a13e66173335c66ff8ef0de99fb9a
4
+ data.tar.gz: 4fb906e15c40bb8c63f678074e65f61a1d6557217e339d03b9610d01238f513e
5
5
  SHA512:
6
- metadata.gz: 9dbf04c9447ce64b41394dfc7ed33924f089542506a054a46da581940efe44be5e2f7bca61014855dacb62efc46d86bdc3e9ac37e470f7c94f411aeec54bf05c
7
- data.tar.gz: 9993038e810b3509f39aeadb41e77d2b29635481469c331daed39ce0154b5a8c2320fed85c301fc182088de93eb6a74b3f77eb5bd1c5ce574c65017567f4e811
6
+ metadata.gz: e8c195eaa6969fc92b4bb5a3d6439ba5b2f7d7d83cf68bea3286079deb2049bfb138c31180ac011be5acaadc3280482438cc4c7e3ef3917a1eadf838938b4643
7
+ data.tar.gz: ca5ddb63afde7d94efe7b3833010da1501031fe54b16167672fbf661fe6e40e3c9168f5214ae9a7df3d821bd03b39fa97320454b6d8a18f6bc1771439beb1069
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 4.0.1
2
+
3
+ * Fix nested post and draft collection mapping
4
+
1
5
  # 4.0.0
2
6
 
3
7
  * Assign files to collections based on paths rather than matching Jekyll collection
@@ -22,6 +22,16 @@ module CloudCannonJekyll
22
22
  @split_drafts = group_by_category_folder(all_drafts, 'drafts')
23
23
  end
24
24
 
25
+ def generate_collections_config_path(key)
26
+ if key.end_with?("/posts")
27
+ File.join(@collections_dir, key.sub(/\/posts$/, "/_posts"))
28
+ elsif key.end_with?("/drafts")
29
+ File.join(@collections_dir, key.sub(/\/drafts$/, "/_drafts"))
30
+ else
31
+ File.join(@collections_dir, "_#{key}")
32
+ end
33
+ end
34
+
25
35
  def generate_collections_config
26
36
  collections = @site.config['collections'] || {}
27
37
  collections_config = @config['collections_config'] || {}
@@ -62,7 +72,7 @@ module CloudCannonJekyll
62
72
 
63
73
  processed['output'] ||= false
64
74
  processed['auto_discovered'] = !collections_config.key?(key)
65
- processed['path'] ||= File.join(@collections_dir, "_#{key}")
75
+ processed['path'] ||= generate_collections_config_path(key)
66
76
  processed['path'] = processed['path'].sub(%r{^/+}, '')
67
77
 
68
78
  Config.rename_legacy_collection_config_keys(processed)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CloudCannonJekyll
4
- VERSION = '4.0.0'
4
+ VERSION = '4.0.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudcannon-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - CloudCannon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-23 00:00:00.000000000 Z
11
+ date: 2023-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll