jekyll-page-hooks 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/CHANGELOG.md +3 -0
- data/lib/jekyll-page-hooks/version.rb +1 -1
- data/lib/jekyll-page-hooks.rb +6 -6
- data/test/_plugins/test.rb +2 -2
- data/test/index.md +6 -2
- metadata +5 -9
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NDY5OGQwMWY3NTMwYTAwNWRlNzI0NDRjZDIwNmRlYWMxNzllYTZlOA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Y2FmZWVkZjZmN2U3NzQ5YWE4OGVlNWI5Y2JiMjQyNDI4MWQyZTg3ZA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
Mzc5YzUyNTI0NDVjMjIwNmZiNGFhNzM3Y2FjYjM0YzQ0N2NjOGY3YzE1YmFh
|
10
|
+
YWUxNDZkYTM3NzYzNWRlOTc1YzliZWQ5NjVhYTc0ZDlhMzM1NWY0NWQxNzA3
|
11
|
+
NDA4NjEzMGYwMzY5ZTFkN2ZmODljNGUwNDZiN2U0NWQ5ZjJjNDU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OWZiZDJjNDM1NjllNDUwYzhjYTIyOWQ5ZDY3MzBmZDRmMmE4ZDY3N2UwNTU0
|
14
|
+
NmMyMmMxMTQ5MWMyOTM0ODcwMTBiNzg1YzBlNWNlMWM5NDU3ODkwMGZhN2Ix
|
15
|
+
ZDdlYTA0ODFiMzA2ZWFkMjc3MTJmNzY5MTU5MzY1ZTdmM2Y1MzI=
|
data/CHANGELOG.md
CHANGED
data/lib/jekyll-page-hooks.rb
CHANGED
@@ -37,11 +37,7 @@ module Jekyll
|
|
37
37
|
# Instantiates all of the page_hook plugins. This is basically
|
38
38
|
# a duplication of the other loaders in Site#setup.
|
39
39
|
def load_page_hooks
|
40
|
-
self.page_hooks = Jekyll::PageHooks
|
41
|
-
!self.safe || c.safe
|
42
|
-
end.map do |c|
|
43
|
-
c.new(self.config)
|
44
|
-
end
|
40
|
+
self.page_hooks = instantiate_subclasses(Jekyll::PageHooks)
|
45
41
|
end
|
46
42
|
end
|
47
43
|
|
@@ -95,8 +91,12 @@ module Jekyll
|
|
95
91
|
self.class.to_s == 'Jekyll::Page'
|
96
92
|
end
|
97
93
|
|
94
|
+
def is_convertible_page?
|
95
|
+
self.class.to_s == 'Jekyll::ConvertiblePage'
|
96
|
+
end
|
97
|
+
|
98
98
|
def is_filterable?
|
99
|
-
is_post? or is_page?
|
99
|
+
is_post? or is_page? or is_convertible_page?
|
100
100
|
end
|
101
101
|
|
102
102
|
# Call the #pre_render methods on all of the loaded
|
data/test/_plugins/test.rb
CHANGED
@@ -35,8 +35,8 @@ module Jekyll
|
|
35
35
|
# Replaces <strong> tag with <strong><blink> after html has been rendered.
|
36
36
|
#
|
37
37
|
def blink_strong(content)
|
38
|
-
content.gsub
|
39
|
-
"<
|
38
|
+
content.gsub /(<strong>.+?<\/strong>)/ do
|
39
|
+
"<blink>#{$1}</blink>"
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
data/test/index.md
CHANGED
@@ -3,16 +3,20 @@ layout: default
|
|
3
3
|
title: Your New Jekyll Site
|
4
4
|
---
|
5
5
|
|
6
|
-
##
|
6
|
+
## Pre Render cupcake test
|
7
7
|
|
8
8
|
Snatch this *cupcake* from my hand.
|
9
9
|
|
10
10
|
If successfull the paragraph above will have zero cupcakes in it.
|
11
11
|
|
12
|
-
##
|
12
|
+
## Post Render blink test
|
13
13
|
|
14
14
|
`<strong>` is for the weak. The age of `<blink><strong>` is **upon us**.
|
15
15
|
|
16
|
+
If successful the previous paragraph will contain `<blink><strong>upon us</blink></strong>`
|
17
|
+
|
16
18
|
## Post write test
|
17
19
|
|
18
20
|
This page was written to disk at ::time::.
|
21
|
+
|
22
|
+
If successful the previous paragraph will contain a `<time>` tag showing when the page was written to disk.
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-page-hooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Brandon Mathis
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: jekyll
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -56,27 +53,26 @@ files:
|
|
56
53
|
homepage: http://github.com/octopress/jekyll-page-hooks
|
57
54
|
licenses:
|
58
55
|
- MIT
|
56
|
+
metadata: {}
|
59
57
|
post_install_message:
|
60
58
|
rdoc_options: []
|
61
59
|
require_paths:
|
62
60
|
- lib
|
63
61
|
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
-
none: false
|
65
62
|
requirements:
|
66
63
|
- - ! '>='
|
67
64
|
- !ruby/object:Gem::Version
|
68
65
|
version: '0'
|
69
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
-
none: false
|
71
67
|
requirements:
|
72
68
|
- - ! '>='
|
73
69
|
- !ruby/object:Gem::Version
|
74
70
|
version: '0'
|
75
71
|
requirements: []
|
76
72
|
rubyforge_project:
|
77
|
-
rubygems_version:
|
73
|
+
rubygems_version: 2.0.7
|
78
74
|
signing_key:
|
79
|
-
specification_version:
|
75
|
+
specification_version: 4
|
80
76
|
summary: Allows other plugins to access page/post content before and after render,
|
81
77
|
and after write.
|
82
78
|
test_files: []
|