github-pages 173 → 174
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/lib/github-pages/configuration.rb +26 -14
- data/lib/github-pages/plugins.rb +0 -1
- data/lib/github-pages/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ca8ac599f93e9a5afaf1df85068cdcc589d2e39
|
4
|
+
data.tar.gz: 60026422083678039afe0771b2db28ad357f9c25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6746385d4eda8696cde9bad19ea465eec37fb23e500e64a3a8a0c974773afe79321c4512f56fd804e26db47515064902d675f9bc0236f5855f755c22a614cb86
|
7
|
+
data.tar.gz: c4599a2189d65e85dc8031c821d60c7c7d48aa7119610fa7d0c07eb73fec4a5eb69e153cebb49f187e443f08b2f197696af0cd43f62f1c5e71810f215f9b3fc5
|
data/.rubocop.yml
CHANGED
@@ -119,6 +119,25 @@ module GitHubPages
|
|
119
119
|
config
|
120
120
|
end
|
121
121
|
|
122
|
+
# Set the site's configuration. Implemented as an `after_reset` hook.
|
123
|
+
# Equivalent #set! function contains the code of interest. This function
|
124
|
+
# guards against double-processing via the value in #processed.
|
125
|
+
def set(site)
|
126
|
+
return if processed? site
|
127
|
+
debug_print_versions
|
128
|
+
set!(site)
|
129
|
+
processed(site)
|
130
|
+
conditionally_require_plugins(site)
|
131
|
+
end
|
132
|
+
|
133
|
+
# Set the site's configuration with all the proper defaults and overrides.
|
134
|
+
# Should be called by #set to protect against multiple processings.
|
135
|
+
def set!(site)
|
136
|
+
site.config = effective_config(site.config)
|
137
|
+
end
|
138
|
+
|
139
|
+
private
|
140
|
+
|
122
141
|
# Ensure we're using Kramdown or GFM. Force to Kramdown if
|
123
142
|
# neither of these.
|
124
143
|
#
|
@@ -137,16 +156,6 @@ module GitHubPages
|
|
137
156
|
}
|
138
157
|
end
|
139
158
|
|
140
|
-
# Set the site's configuration. Implemented as an `after_reset` hook.
|
141
|
-
# Equivalent #set! function contains the code of interest. This function
|
142
|
-
# guards against double-processing via the value in #processed.
|
143
|
-
def set(site)
|
144
|
-
return if processed? site
|
145
|
-
debug_print_versions
|
146
|
-
set!(site)
|
147
|
-
processed(site)
|
148
|
-
end
|
149
|
-
|
150
159
|
# Print the versions for github-pages and jekyll to the debug
|
151
160
|
# stream for debugging purposes. See by running Jekyll with '--verbose'
|
152
161
|
def debug_print_versions
|
@@ -154,10 +163,13 @@ module GitHubPages
|
|
154
163
|
Jekyll.logger.debug "GitHub Pages:", "jekyll v#{Jekyll::VERSION}"
|
155
164
|
end
|
156
165
|
|
157
|
-
#
|
158
|
-
|
159
|
-
|
160
|
-
|
166
|
+
# To minimize erorrs, lazy-load plugins if they're requested by the user
|
167
|
+
def conditionally_require_plugins(site)
|
168
|
+
plugins = []
|
169
|
+
plugins.push "jekyll-remote-theme" if site.config.key? "remote_theme"
|
170
|
+
Jekyll::External.require_with_graceful_fail(
|
171
|
+
plugins.select { |plugin| site.plugin_manager.plugin_allowed?(plugin) }
|
172
|
+
)
|
161
173
|
end
|
162
174
|
end
|
163
175
|
end
|
data/lib/github-pages/plugins.rb
CHANGED
data/lib/github-pages/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '174'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|