jekyll-notion 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/jekyll-notion/generator.rb +1 -1
- data/lib/jekyll-notion/notion_database.rb +7 -4
- data/lib/jekyll-notion/notion_page.rb +2 -8
- data/lib/jekyll-notion/version.rb +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d730d8b3c38a4857f9a506b6219aeba97b31f9257fb6c6ecfefe5fe2c30e921c
|
4
|
+
data.tar.gz: 7ce7ce2738857027a3b2f48fc5b237b1e4725963d9a2a5273a12c92ba41477f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc4d474362dd91a1308a917654d725151877f81f348c768211aa272a265233e3af82119d47e75209e3aaeb205207a15a325a8795e18d2a4fd8c27ead79f947d8
|
7
|
+
data.tar.gz: bcf4276e64b3d2176a015b8ab81ced2d4f4e3cc2e8a2755f4a54502d1b0b28c6d43ca234b55d55765572d7c36ee69986f132475c4c200a052c2b0171538cf72a
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# jekyll-notion
|
2
2
|
|
3
|
-
Import notion pages to
|
3
|
+
Import notion pages to jekyll.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -68,8 +68,8 @@ Each dabatase support the following options.
|
|
68
68
|
|
69
69
|
* `id`: the notion database unique identifier,
|
70
70
|
* `collection`: the collection each page belongs to (posts by default),
|
71
|
-
* `filter`: the database query
|
72
|
-
* `
|
71
|
+
* `filter`: the database [filter property](https://developers.notion.com/reference/post-database-query-filter),
|
72
|
+
* `sorts`: the database [sorts criteria](https://developers.notion.com/reference/post-database-query-sort),
|
73
73
|
|
74
74
|
```yml
|
75
75
|
notion:
|
@@ -77,7 +77,7 @@ notion:
|
|
77
77
|
id: e42383cd49754897b967ce453760499f
|
78
78
|
collection: posts
|
79
79
|
filter: { "property": "Published", "checkbox": { "equals": true } }
|
80
|
-
|
80
|
+
sorts: [{ "timestamp": "created_time", "direction": "ascending" }]
|
81
81
|
```
|
82
82
|
|
83
83
|
### Pages
|
@@ -7,7 +7,7 @@ module JekyllNotion
|
|
7
7
|
return [] unless id?
|
8
8
|
|
9
9
|
@fetch ||= @notion.database_query(query)[:results].map do |page|
|
10
|
-
NotionToMd::Page.new(:page => page, :blocks => @notion.block_children(:
|
10
|
+
NotionToMd::Page.new(:page => page, :blocks => @notion.block_children(:block_id => page.id))
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -15,8 +15,11 @@ module JekyllNotion
|
|
15
15
|
config["filter"]
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
19
|
-
config["sort"]
|
18
|
+
def sorts
|
19
|
+
if config["sort"]
|
20
|
+
Jekyll.logger.warn("Jekyll Notion:", "sort property will be deprecated, use sorts instead")
|
21
|
+
end
|
22
|
+
config["sorts"] || config["sort"]
|
20
23
|
end
|
21
24
|
|
22
25
|
def collection_name
|
@@ -30,7 +33,7 @@ module JekyllNotion
|
|
30
33
|
private
|
31
34
|
|
32
35
|
def query
|
33
|
-
{ :
|
36
|
+
{ :database_id => id, :filter => filter, :sorts => sorts }.compact
|
34
37
|
end
|
35
38
|
end
|
36
39
|
end
|
@@ -6,8 +6,8 @@ module JekyllNotion
|
|
6
6
|
def fetch
|
7
7
|
return nil unless id?
|
8
8
|
|
9
|
-
@fetch ||= NotionToMd::Page.new(:page => @notion.page(
|
10
|
-
:blocks => @notion.block_children(
|
9
|
+
@fetch ||= NotionToMd::Page.new(:page => @notion.page({ :page_id => id }),
|
10
|
+
:blocks => @notion.block_children({ :block_id => id }))
|
11
11
|
end
|
12
12
|
|
13
13
|
def data_name
|
@@ -17,11 +17,5 @@ module JekyllNotion
|
|
17
17
|
def collection_name
|
18
18
|
nil
|
19
19
|
end
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def query
|
24
|
-
{ :id => id }
|
25
|
-
end
|
26
20
|
end
|
27
21
|
end
|
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: 2.
|
4
|
+
version: 2.1.0
|
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-
|
11
|
+
date: 2022-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -36,28 +36,28 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 1.0.0
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 1.0.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: notion_to_md
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 1.2.0
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
60
|
+
version: 1.2.0
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: bundler
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,8 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
- !ruby/object:Gem::Version
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
|
-
|
146
|
-
rubygems_version: 2.7.3
|
145
|
+
rubygems_version: 3.1.6
|
147
146
|
signing_key:
|
148
147
|
specification_version: 4
|
149
148
|
summary: A Jekyll plugin to generate pages from Notion
|