jekyll-notion 1.1.0 → 1.1.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.
- checksums.yaml +4 -4
- data/lib/jekyll-notion/data_generator.rb +8 -0
- data/lib/jekyll-notion/generator.rb +6 -1
- data/lib/jekyll-notion/version.rb +1 -1
- 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: d06d0e87707f04d3125126bc7b801c38b6d25aa047ccea5074c567de5504c166
|
4
|
+
data.tar.gz: cb581ec500f718c21156eacdffbd3b77368254573de4bfc891f5e074aea8d811
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4acb7a0293e3136b7ef128e3881c2683dc81c9daa56ce1f5659fdae146b117014a25660c394b692995d7b86bc0d06f2b2aeeccc1179c4571d035cbeb232c868
|
7
|
+
data.tar.gz: fd462f54aaebbbf8fdfa925653b74b2443603ff10a7fb8c25b38dc63bea4f13fb261fcfb619c8e0f84d7974c1e2f5ae3a69ff0489bf817c2bacc7dd71a094381
|
@@ -6,6 +6,7 @@ module JekyllNotion
|
|
6
6
|
@site.data[@db.data] = data
|
7
7
|
# Caching current data
|
8
8
|
@plugin.data[@db.data] = data
|
9
|
+
log_pages
|
9
10
|
end
|
10
11
|
|
11
12
|
private
|
@@ -13,5 +14,12 @@ module JekyllNotion
|
|
13
14
|
def data
|
14
15
|
@data ||= @db.pages.map(&:props)
|
15
16
|
end
|
17
|
+
|
18
|
+
def log_pages
|
19
|
+
@db.pages.each do |page|
|
20
|
+
Jekyll.logger.info("Jekyll Notion:", "Page => #{page.title}")
|
21
|
+
Jekyll.logger.debug("", "Props => #{page.props.keys.inspect}")
|
22
|
+
end
|
23
|
+
end
|
16
24
|
end
|
17
25
|
end
|
@@ -9,10 +9,11 @@ module JekyllNotion
|
|
9
9
|
|
10
10
|
return unless notion_token? && config?
|
11
11
|
|
12
|
-
if fetch_on_watch? ||
|
12
|
+
if fetch_on_watch? || collections_and_data_empty?
|
13
13
|
read_notion_database
|
14
14
|
else
|
15
15
|
collections.each_pair { |key, val| @site.collections[key] = val }
|
16
|
+
data.each_pair { |key, val| @site.data[key] = val }
|
16
17
|
end
|
17
18
|
end
|
18
19
|
|
@@ -30,6 +31,10 @@ module JekyllNotion
|
|
30
31
|
|
31
32
|
protected
|
32
33
|
|
34
|
+
def collections_and_data_empty?
|
35
|
+
collections.empty? && data.empty?
|
36
|
+
end
|
37
|
+
|
33
38
|
def read_notion_database
|
34
39
|
databases.each do |db_config|
|
35
40
|
db = NotionDatabase.new(:config => db_config)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-notion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Enrique Arias
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|