jekyll-notion-cms 1.0.0 → 1.0.1

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.
Binary file
@@ -191,11 +191,11 @@ module JekyllNotionCMS
191
191
  end
192
192
  end
193
193
 
194
- # Extract first value from rollup array
194
+ # Extract values from rollup array
195
195
  def extract_rollup_array(array)
196
196
  return nil if array.nil? || array.empty?
197
197
 
198
- array.map do |item|
198
+ values = array.map do |item|
199
199
  case item['type']
200
200
  when 'title'
201
201
  item['title'].map { |text| text['plain_text'] }.join
@@ -206,7 +206,12 @@ module JekyllNotionCMS
206
206
  when 'number'
207
207
  item['number']
208
208
  end
209
- end.compact.first
209
+ end.compact
210
+
211
+ return nil if values.empty?
212
+
213
+ # Return single value if only one, otherwise return array
214
+ values.length == 1 ? values.first : values
210
215
  end
211
216
 
212
217
  # Formula property
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllNotionCMS
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-notion-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxime Lenne
@@ -144,9 +144,12 @@ files:
144
144
  - LICENSE
145
145
  - README.md
146
146
  - Rakefile
147
+ - docs/Download_on_the_App_Store_Badge_FR_RGB_wht_100217.svg
147
148
  - docs/EXAMPLES_AND_CONFIGURATION.md
148
149
  - docs/architecture.excalidraw
149
150
  - docs/architecture.png
151
+ - docs/templates/architecture.excalidraw
152
+ - docs/templates/architecture.png
150
153
  - docs/templates/github-actions_notion-sync.yml
151
154
  - docs/templates/n8n-workflow_Notion-database-change-trigger-GitHub-Actions.json
152
155
  - lib/jekyll-notion-cms.rb