jekyll-ignore-layouts 0.1.1 → 0.1.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 577ab719ac02819b56e9a9bfa8f1a026fe89dc0c283ddf3b477b6853ecf4e0ce
|
4
|
+
data.tar.gz: e85b33f35382988880c2fd4b2b1170a0975d02eb1f06fbe983d018f2e5b5a612
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5a7ee503eabd9a7ef4ff17c99c5ab7a3dd7b3b289b22cd3cdd8b601ff54cb8d1f0306b9c70efda2ccad4982e3412d96abd371f1f32e5fa69765f6a018e47c06
|
7
|
+
data.tar.gz: 6d4765b08209ed77e296bf5ab9f1b7e1e52b2847901cdf758afed5ae76bb1a6f17bd1855eeae39adffd166f8ef333a656950166ad770ae772db0feaad0b15624
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Jekyll
|
4
|
+
module DoctorIgnoreLayout
|
5
|
+
def self.included(base)
|
6
|
+
base.class_eval do
|
7
|
+
class << self
|
8
|
+
private
|
9
|
+
|
10
|
+
alias :original_allow_used_permalink? :allow_used_permalink?
|
11
|
+
|
12
|
+
def allow_used_permalink?(item)
|
13
|
+
return true if item.respond_to?(:site) &&
|
14
|
+
item.respond_to?(:data) &&
|
15
|
+
item.site.ignored_layout?(item.data['layout'])
|
16
|
+
|
17
|
+
original_allow_used_permalink? item
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
Jekyll::Commands::Doctor.include Jekyll::DoctorIgnoreLayout
|
@@ -8,9 +8,9 @@ module Jekyll
|
|
8
8
|
|
9
9
|
# Only write the document when its layout is not ignored
|
10
10
|
def invalid_layout?(layout)
|
11
|
-
return false if site.ignored_layout?(layout)
|
11
|
+
return false if site.ignored_layout?(document.data['layout'])
|
12
12
|
|
13
|
-
original_invalid_layout?
|
13
|
+
original_invalid_layout? layout
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-ignore-layouts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- f
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- LICENSE.txt
|
37
37
|
- README.md
|
38
38
|
- lib/jekyll-ignore-layouts.rb
|
39
|
+
- lib/jekyll/commands/doctor_ignore_layout.rb
|
39
40
|
- lib/jekyll/document_ignore_layout.rb
|
40
41
|
- lib/jekyll/renderer_ignore_layout.rb
|
41
42
|
- lib/jekyll/site_ignore_layout.rb
|