jekyll-titles-from-headings 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cb2cb40f212c203df58d90ab8c19f5858956389
|
4
|
+
data.tar.gz: 33670fe41d7bfeea58845ad64ff3663b36a018fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c21e5298696a11f0a933421fc52fb912b6da27a484a273c866baba80271ded9b03050c8dafa35010179025ade41d0369c2f8f294c748fe56befa69d2faba8a5
|
7
|
+
data.tar.gz: eedceedad33c8cfe440ff4268474932b6010170232aa44602dd895ff78f46a15a9ec187e1c5fadd69c3fcea70b1c6454f03e24f89d789fcfdc24ec6efcfb6f9e
|
@@ -20,6 +20,9 @@ module JekyllTitlesFromHeadings
|
|
20
20
|
# (footnotes at the moment).
|
21
21
|
EXTRA_MARKUP_REGEX = %r!\[\^[^\]]*\]!
|
22
22
|
|
23
|
+
# Regex to determine if the given document is the site's homepage
|
24
|
+
HOMEPAGE_REGEX = %r!^/(index.html?)?$!
|
25
|
+
|
23
26
|
safe true
|
24
27
|
priority :lowest
|
25
28
|
|
@@ -37,7 +40,7 @@ module JekyllTitlesFromHeadings
|
|
37
40
|
end
|
38
41
|
|
39
42
|
def should_add_title?(document)
|
40
|
-
markdown?(document) && !title?(document)
|
43
|
+
markdown?(document) && !title?(document) && !homepage?(document)
|
41
44
|
end
|
42
45
|
|
43
46
|
def title?(document)
|
@@ -71,5 +74,9 @@ module JekyllTitlesFromHeadings
|
|
71
74
|
def filters
|
72
75
|
@filters ||= JekyllTitlesFromHeadings::Filters.new(site)
|
73
76
|
end
|
77
|
+
|
78
|
+
def homepage?(document)
|
79
|
+
document.url =~ HOMEPAGE_REGEX
|
80
|
+
end
|
74
81
|
end
|
75
82
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-titles-from-headings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|