jekyll-fm 13.0.0 → 14.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/fm.rb +24 -23
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5269a5fde6641e1fb7e1b03d53047c303e1c70d
|
4
|
+
data.tar.gz: a4164aa8e2acb94cdf9e5cb5dc717c4efa42b699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efbc32e8cfbe121ebf2b392890ca7e2cfcf677a5eedff6fae00f77c09bf026c4eeb57e53a7cdbb716665814715e0f569c497881df46866ae82767bd2a7a674aa
|
7
|
+
data.tar.gz: a525df303a878ab04ef6f522fa6613220960a994a8690e51a93e4bfd70318df3fb455fc4f9ef9baf94a7112eabe28f2b4dc0ed140119e4e13206246c0f4514d6
|
data/lib/jekyll/fm.rb
CHANGED
@@ -26,38 +26,39 @@ class String
|
|
26
26
|
def reverse_color; "\e[7m#{self}\e[27m" end
|
27
27
|
end
|
28
28
|
|
29
|
-
Jekyll::Hooks.register :site, :pre_render do |site|
|
30
|
-
|
29
|
+
# Jekyll::Hooks.register :site, :pre_render do |site|
|
30
|
+
Jekyll::Hooks.register :pages, :post_init do |page|
|
31
31
|
puts "JEKYLL-FM::HOOK".bg_blue
|
32
|
-
|
32
|
+
puts "#{page}".red
|
33
|
+
# COLLECTION = 'pages'
|
33
34
|
|
34
|
-
directory_root = site.collections[COLLECTION].directory
|
35
|
-
files = site.collections[COLLECTION].filtered_entries
|
35
|
+
# directory_root = site.collections[COLLECTION].directory
|
36
|
+
# files = site.collections[COLLECTION].filtered_entries
|
36
37
|
|
37
|
-
puts "directory_root: #{directory_root}".green
|
38
|
-
puts "files: #{files}".red
|
38
|
+
# puts "directory_root: #{directory_root}".green
|
39
|
+
# puts "files: #{files}".red
|
39
40
|
|
40
41
|
|
41
|
-
# site.posts.docs.each do |f|
|
42
|
-
files.each do |f|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
# # site.posts.docs.each do |f|
|
43
|
+
# files.each do |f|
|
44
|
+
# file_path = File.join(directory_root, f)
|
45
|
+
# file = FrontMatterParser::Parser.parse_file(file_path)
|
46
|
+
# header = file.front_matter
|
47
|
+
# body = file.content
|
47
48
|
|
48
|
-
|
49
|
-
|
49
|
+
# puts "header: #{header}".green
|
50
|
+
# puts "body: #{body}".red
|
50
51
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
# # add to the front matter section
|
53
|
+
# header['category'] = 'category'
|
54
|
+
# header['sub_category'] = 'sub_category'
|
55
|
+
# text = header.to_yaml
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
|
57
|
+
# text << "---"
|
58
|
+
# text << "\n"
|
59
|
+
# text << body
|
59
60
|
|
60
|
-
|
61
|
+
# File.write(file_path, text)
|
61
62
|
|
62
63
|
end
|
63
64
|
|