jekyll-notion 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/jekyll-notion/generator.rb +14 -7
- 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: 7d1ccb2f2f5451b3eaf6d80dd8f8fed62cd2d5fd582d1cce09fbf10a494b54ac
|
4
|
+
data.tar.gz: f651dd2f6e3c5404b33af0abdb11274eacc34296c6301e9d79d76f38ccb8f1e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f87ce41674b28e289e7b69a0d4a40ac64fc0c9e9384ce5fdfb9b82312ba439ba60c5b7bab2a8ead2d1075adffd4a852bbae7534acc67d5317221c5fe236b52bf
|
7
|
+
data.tar.gz: 9ac472cd2c48b0affd89825b8d08a11fb8e562ac8da05193111bcc85f219196352345f4c6ebd6ff0b9721c847f00e30fc0820190fa8dd6950758355b24aafbd5
|
data/README.md
CHANGED
@@ -36,19 +36,26 @@ module JekyllNotion
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def make_frontmatter
|
39
|
+
data = Jekyll::Utils.deep_merge_hashes(config_frontmatter, notion_frontmatter)
|
40
|
+
page_frontmatter = data.to_a.map { |k, v| "#{k}: #{v}" }.join("\n")
|
39
41
|
<<~CONTENT
|
40
42
|
---
|
41
|
-
|
42
|
-
title: #{current_page.title}
|
43
|
-
date: #{current_page.created_datetime}
|
44
|
-
cover: #{current_page.cover}
|
45
|
-
#{frontmatter}
|
43
|
+
#{page_frontmatter}
|
46
44
|
---
|
47
45
|
CONTENT
|
48
46
|
end
|
49
47
|
|
50
|
-
def
|
51
|
-
|
48
|
+
def notion_frontmatter
|
49
|
+
{
|
50
|
+
:id => current_page.id,
|
51
|
+
:title => current_page.title,
|
52
|
+
:date => current_page.created_datetime,
|
53
|
+
:cover => current_page.cover,
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
def config_frontmatter
|
58
|
+
config.dig("database", "frontmatter") || {}
|
52
59
|
end
|
53
60
|
|
54
61
|
def make_filename
|
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: 0.0.
|
4
|
+
version: 0.0.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-01-
|
11
|
+
date: 2022-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|