jekyll-fm 10.0.0 → 11.0.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll/fm.rb +8 -38
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea378d28c559ef9175487ff31cf6b995707243cd
4
- data.tar.gz: bb3ee8a16b91d2b8baf9eb419a20f96b5ed4de24
3
+ metadata.gz: 8f810ca4258eef2cec27ccd1dd201426aeb93405
4
+ data.tar.gz: cfcf2416e9bd6d151513696f8a1487279c9f98dd
5
5
  SHA512:
6
- metadata.gz: e4364d349489e865f3f81653be29c5d32618517add1d12fa6bb8e96d13200f71310be69a5df6831a16c2e5c5d7bf46b968a63b2fd0450813181e005743986924
7
- data.tar.gz: 99eea316290ae1c3f92dbeaccd6b770dabb236aec0a1abc83b24dffa52dc575c37962ea9e144b75ea22a5e2b1f62dc5242434feebdf4d40e84fac80ba6a3eff1
6
+ metadata.gz: ffe3dea317c6cf2e8bde1bfc7bb65b061d2290207ebf00affd587f0ed83871a71d4b6374e4e682177d00f0078b8c39fb020ca4d49b7c1e097f4af915fecbe04f
7
+ data.tar.gz: ae4c83034a7067b49602e97416144c82a210e20315cf2e7f2be58d1bf9a4f1eb42ab6bb46755a193844afe23c8bcc7dd1f6209065b97718d778b4f3ef5443d1f
@@ -1,45 +1,15 @@
1
- require 'yaml'
2
-
3
- class Yaml
4
- # @!attribute [r] whitelist_classes
5
- # Classes that may be parsed by #call.
6
- attr_reader :whitelist_classes
7
-
8
- def initialize(whitelist_classes: [])
9
- @whitelist_classes = whitelist_classes
10
- end
11
-
12
- # Loads a hash front matter from a string
13
- #
14
- # @param string [String] front matter string representation
15
- # @return [Hash] front matter hash representation
16
- def call(string)
17
- YAML.safe_load(string, whitelist_classes)
18
- end
19
- end
20
-
21
- def syntax_from_pathname(pathname)
22
- File.extname(pathname)[1..-1].to_sym
23
- end
24
-
25
- def parse_file(pathname)
26
- syntax_parser |= syntax_from_pathname(pathname)
27
- loader = Yaml.new
28
- File.open(pathname) do |file|
29
- new(syntax_parser, loader: loader).call(file.read)
30
- end
31
- end
32
-
1
+ require 'front_matter_parser'
33
2
 
34
3
  Jekyll::Hooks.register :site, :post_read do |site|
35
4
  # Jekyll::Hooks.register :pages, :post_init do |pages|
36
5
  puts site
37
- site.posts.each do |f|
38
- puts "f.path: #{f.path}"
39
- # file_path = File.join("_#{collection}", md_path)
40
- file = parse_file(f.path)
41
- puts "file: #{file}"
42
- end
6
+ # parsed = FrontMatterParser::Parser.parse_file('example.md')
7
+ # site.posts.each do |f|
8
+ # puts "f.path: #{f.path}"
9
+ # # file_path = File.join("_#{collection}", md_path)
10
+ # file = parse_file(f.path)
11
+ # puts "file: #{file}"
12
+ # end
43
13
  # InjectorPlugin::Hola.hi
44
14
  end
45
15
 
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: 10.0.0
4
+ version: 11.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - A E