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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll/fm.rb +24 -23
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0bc92e5cb7c734d15fde0d5e6c5e161c627d9243
4
- data.tar.gz: d061251154069d4daf355c83bcc8a396b1895bb7
3
+ metadata.gz: d5269a5fde6641e1fb7e1b03d53047c303e1c70d
4
+ data.tar.gz: a4164aa8e2acb94cdf9e5cb5dc717c4efa42b699
5
5
  SHA512:
6
- metadata.gz: 5da1fd1ad3dcc1a448f8f1b68487eb4518a7517f65d0a5350fe509aefc3731dd553c70b8a2d62144576f2edc7ed47d465a1c9207f58e1880d91f23b03a5af248
7
- data.tar.gz: 0a6a375f6310b98f0590a173efd019e4c0cbefb9787a15a7d65d9bdad5329ebf5c315408007652c6d7522a8eddaf41b604ab7c1d3b02e46f68f81bc450a47019
6
+ metadata.gz: efbc32e8cfbe121ebf2b392890ca7e2cfcf677a5eedff6fae00f77c09bf026c4eeb57e53a7cdbb716665814715e0f569c497881df46866ae82767bd2a7a674aa
7
+ data.tar.gz: a525df303a878ab04ef6f522fa6613220960a994a8690e51a93e4bfd70318df3fb455fc4f9ef9baf94a7112eabe28f2b4dc0ed140119e4e13206246c0f4514d6
@@ -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
- # Jekyll::Hooks.register :pages, :post_init do |pages|
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
- COLLECTION = 'pages'
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
- file_path = File.join(directory_root, f)
44
- file = FrontMatterParser::Parser.parse_file(file_path)
45
- header = file.front_matter
46
- body = file.content
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
- puts "header: #{header}".green
49
- puts "body: #{body}".red
49
+ # puts "header: #{header}".green
50
+ # puts "body: #{body}".red
50
51
 
51
- # add to the front matter section
52
- header['category'] = 'category'
53
- header['sub_category'] = 'sub_category'
54
- text = header.to_yaml
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
- text << "---"
57
- text << "\n"
58
- text << body
57
+ # text << "---"
58
+ # text << "\n"
59
+ # text << body
59
60
 
60
- File.write(file_path, text)
61
+ # File.write(file_path, text)
61
62
 
62
63
  end
63
64
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-fm
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.0.0
4
+ version: 14.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - A E