jekyll-v4-github-pages 231 → 233
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -0
- data/bin/jekyll-v4-github-pages +13 -0
- data/lib/_default_config.yml +23 -0
- data/lib/github-pages/configuration.rb +9 -70
- data/lib/github-pages/plugins.rb +1 -1
- data/lib/github-pages/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6261b7568c6aaf356ce8046a6f73877535b2acfa3ff7e539a14c02529c546cd4
|
4
|
+
data.tar.gz: 1ca23404fd54cd61efc08c24bde40e86d5d8e2d30dae3332d771dfd95139dd16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94c8a430291c9f6609f2175ea5d14da77222b2c3f60e5aea4d58f3e3acc745b744ff7a1f8ade3ad2f0fce59103f26c262a0465a8515c47431b12b0eb149090dd
|
7
|
+
data.tar.gz: c2b43512877eb1d2f4fb7cf44b4731bbeb6ba22f1ec44e6be3b9d46d133a1b8f67ae63ba35bd63d1a4970cc9604debfb16eb90dd4446d9401dd9dbcb73084d1a
|
data/.rubocop.yml
CHANGED
@@ -126,12 +126,21 @@ Metrics/MethodLength:
|
|
126
126
|
Style/Alias:
|
127
127
|
Enabled: false # We have no guidance on alias vs alias_method
|
128
128
|
|
129
|
+
Style/MapToSet:
|
130
|
+
Enabled: true
|
131
|
+
|
132
|
+
Style/MinMaxComparison:
|
133
|
+
Enabled: true
|
134
|
+
|
129
135
|
Style/RedundantSelf:
|
130
136
|
Enabled: false # Sometimes a self.field is a bit more clear
|
131
137
|
|
132
138
|
Style/IfUnlessModifier:
|
133
139
|
Enabled: false
|
134
140
|
|
141
|
+
Style/YodaExpression:
|
142
|
+
Enabled: true
|
143
|
+
|
135
144
|
Naming/FileName: #Rubocop doesn't like the Git*H*ub namespace
|
136
145
|
Enabled: false
|
137
146
|
|
data/bin/jekyll-v4-github-pages
CHANGED
@@ -65,8 +65,21 @@ Mercenary.program(:"jekyll-v4-github-pages") do |p|
|
|
65
65
|
c.option 'source', '--source DIR', 'From where to collect the source files'
|
66
66
|
c.option 'destination', '--destination DIR', 'To where the compiled files should be written'
|
67
67
|
c.option 'future', '--future', 'Publishes posts with a future date'
|
68
|
+
c.option 'config', '--config FILE1[,FILE2[,FILE3]]', Array, 'Specify config files instead of using _config.yml'
|
68
69
|
|
69
70
|
c.action do |_, options|
|
71
|
+
config = options["config"] || ["_config.yml"]
|
72
|
+
|
73
|
+
default_config = File.expand_path("../../lib/_default_config.yml", __FILE__)
|
74
|
+
options["config"] = [default_config]
|
75
|
+
|
76
|
+
config.each { |item|
|
77
|
+
user_config = File.join(options["source"] || Dir.pwd, item)
|
78
|
+
if File.exist?(user_config)
|
79
|
+
options["config"].push(user_config)
|
80
|
+
end
|
81
|
+
}
|
82
|
+
|
70
83
|
Jekyll::Commands::Build.process(options)
|
71
84
|
end
|
72
85
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Default, user overwritable options
|
2
|
+
jailed: false
|
3
|
+
future: false
|
4
|
+
theme: jekyll-v4-theme-primer
|
5
|
+
markdown: kramdown
|
6
|
+
kramdown:
|
7
|
+
input: GFM
|
8
|
+
hard_wrap: false
|
9
|
+
gfm_quirks: paragraph_end
|
10
|
+
syntax_highlighter_opts:
|
11
|
+
default_lang: plaintext
|
12
|
+
template: ""
|
13
|
+
math_engine: mathjax
|
14
|
+
syntax_highlighter: rouge
|
15
|
+
exclude:
|
16
|
+
- CNAME
|
17
|
+
|
18
|
+
# Previously not overwritable, now these can be configured as well
|
19
|
+
lsi: false
|
20
|
+
safe: true
|
21
|
+
highlighter: rouge
|
22
|
+
gist:
|
23
|
+
noscript: false
|
@@ -3,7 +3,8 @@
|
|
3
3
|
require "securerandom"
|
4
4
|
|
5
5
|
module GitHubPages
|
6
|
-
# Sets and manages Jekyll configuration defaults
|
6
|
+
# Sets and manages Jekyll configuration defaults
|
7
|
+
# Most configuration is now set in _default_config.yml
|
7
8
|
class Configuration
|
8
9
|
# Backward compatability of constants
|
9
10
|
DEFAULT_PLUGINS = GitHubPages::Plugins::DEFAULT_PLUGINS
|
@@ -11,57 +12,13 @@ module GitHubPages
|
|
11
12
|
DEVELOPMENT_PLUGINS = GitHubPages::Plugins::DEVELOPMENT_PLUGINS
|
12
13
|
THEMES = GitHubPages::Plugins::THEMES
|
13
14
|
|
14
|
-
# Default, user overwritable options
|
15
|
-
DEFAULTS = {
|
16
|
-
"jailed" => false,
|
17
|
-
"plugins" => GitHubPages::Plugins::DEFAULT_PLUGINS,
|
18
|
-
"future" => true,
|
19
|
-
"theme" => "jekyll-v4-theme-primer",
|
20
|
-
"markdown" => "kramdown",
|
21
|
-
"kramdown" => {
|
22
|
-
"input" => "GFM",
|
23
|
-
"hard_wrap" => false,
|
24
|
-
"gfm_quirks" => "paragraph_end",
|
25
|
-
"syntax_highlighter_opts" => {
|
26
|
-
"default_lang" => "plaintext",
|
27
|
-
},
|
28
|
-
},
|
29
|
-
"exclude" => ["CNAME"],
|
30
|
-
}.freeze
|
31
|
-
|
32
15
|
# User-overwritable defaults used only in production for practical reasons
|
33
|
-
PRODUCTION_DEFAULTS =
|
16
|
+
PRODUCTION_DEFAULTS = {
|
34
17
|
"sass" => {
|
35
18
|
"style" => "compressed",
|
36
19
|
},
|
37
20
|
}.freeze
|
38
21
|
|
39
|
-
# Options which GitHub Pages sets, regardless of the user-specified value
|
40
|
-
#
|
41
|
-
# The following values are also overridden by GitHub Pages, but are not
|
42
|
-
# overridden locally, for practical purposes:
|
43
|
-
# * source
|
44
|
-
# * destination
|
45
|
-
# * jailed
|
46
|
-
# * verbose
|
47
|
-
# * incremental
|
48
|
-
# * GH_ENV
|
49
|
-
OVERRIDES = {
|
50
|
-
"lsi" => false,
|
51
|
-
"safe" => true,
|
52
|
-
"plugins_dir" => SecureRandom.hex,
|
53
|
-
"whitelist" => GitHubPages::Plugins::PLUGIN_WHITELIST,
|
54
|
-
"highlighter" => "rouge",
|
55
|
-
"kramdown" => {
|
56
|
-
"template" => "",
|
57
|
-
"math_engine" => "mathjax",
|
58
|
-
"syntax_highlighter" => "rouge",
|
59
|
-
},
|
60
|
-
"gist" => {
|
61
|
-
"noscript" => false,
|
62
|
-
},
|
63
|
-
}.freeze
|
64
|
-
|
65
22
|
class << self
|
66
23
|
def processed?(site)
|
67
24
|
site.instance_variable_get(:@_github_pages_processed) == true
|
@@ -79,31 +36,19 @@ module GitHubPages
|
|
79
36
|
Jekyll.env == "development"
|
80
37
|
end
|
81
38
|
|
82
|
-
def defaults_for_env
|
83
|
-
defaults = development? ? DEFAULTS : PRODUCTION_DEFAULTS
|
84
|
-
Jekyll::Utils.deep_merge_hashes Jekyll::Configuration::DEFAULTS, defaults
|
85
|
-
end
|
86
|
-
|
87
|
-
# Given a user's config, determines the effective configuration by building a user
|
88
|
-
# configuration sandwhich with our overrides overriding the user's specified
|
89
|
-
# values which themselves override our defaults.
|
90
|
-
#
|
91
39
|
# Returns the effective Configuration
|
92
40
|
#
|
93
41
|
# Note: this is a highly modified version of Jekyll#configuration
|
94
42
|
def effective_config(user_config)
|
95
|
-
|
96
|
-
|
97
|
-
.
|
43
|
+
config = user_config
|
44
|
+
if !development?
|
45
|
+
config = Jekyll::Utils.deep_merge_hashes PRODUCTION_DEFAULTS, config
|
46
|
+
end
|
98
47
|
|
99
48
|
# Allow theme to be explicitly disabled via "theme: null"
|
100
49
|
config["theme"] = user_config["theme"] if user_config.key?("theme")
|
101
50
|
|
102
51
|
migrate_theme_to_remote_theme(config)
|
103
|
-
exclude_cname(config)
|
104
|
-
|
105
|
-
# Merge overwrites into user config
|
106
|
-
config = Jekyll::Utils.deep_merge_hashes config, OVERRIDES
|
107
52
|
|
108
53
|
restrict_and_config_markdown_processor(config)
|
109
54
|
|
@@ -123,7 +68,7 @@ module GitHubPages
|
|
123
68
|
processed(site)
|
124
69
|
end
|
125
70
|
|
126
|
-
# Set the site's configuration with all the proper defaults
|
71
|
+
# Set the site's configuration with all the proper defaults.
|
127
72
|
# Should be called by #set to protect against multiple processings.
|
128
73
|
def set!(site)
|
129
74
|
site.config = effective_config(site.config)
|
@@ -154,17 +99,11 @@ module GitHubPages
|
|
154
99
|
# This functionality has been rolled back due to complications with jekyll-remote-theme.
|
155
100
|
end
|
156
101
|
|
157
|
-
# If the user's 'exclude' config is the default, also exclude the CNAME
|
158
|
-
def exclude_cname(config)
|
159
|
-
return unless config["exclude"].eql? Jekyll::Configuration::DEFAULT_EXCLUDES
|
160
|
-
|
161
|
-
config["exclude"].concat(DEFAULTS["exclude"])
|
162
|
-
end
|
163
|
-
|
164
102
|
# Requires default plugins and configures whitelist in development
|
165
103
|
def configure_plugins(config)
|
166
104
|
# Ensure we have those gems we want.
|
167
105
|
config["plugins"] = Array(config["plugins"]) | DEFAULT_PLUGINS
|
106
|
+
config["whitelist"] = Array(config["whitelist"]) | PLUGIN_WHITELIST
|
168
107
|
|
169
108
|
# To minimize errors, lazy-require jekyll-remote-theme if requested by the user
|
170
109
|
config["plugins"].push("jekyll-remote-theme") if config.key? "remote_theme"
|
data/lib/github-pages/plugins.rb
CHANGED
@@ -49,7 +49,7 @@ module GitHubPages
|
|
49
49
|
"minima" => "2.5.1",
|
50
50
|
"jekyll-swiss" => "1.0.0",
|
51
51
|
"jekyll-theme-primer" => "0.6.0",
|
52
|
-
"jekyll-v4-theme-primer" => "0.
|
52
|
+
"jekyll-v4-theme-primer" => "0.12.0",
|
53
53
|
"jekyll-theme-architect" => "0.2.0",
|
54
54
|
"jekyll-theme-cayman" => "0.2.0",
|
55
55
|
"jekyll-theme-dinky" => "0.2.0",
|
data/lib/github-pages/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-v4-github-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '233'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub, Inc.
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-05-
|
12
|
+
date: 2023-05-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jekyll
|
@@ -409,14 +409,14 @@ dependencies:
|
|
409
409
|
requirements:
|
410
410
|
- - '='
|
411
411
|
- !ruby/object:Gem::Version
|
412
|
-
version: 0.
|
412
|
+
version: 0.12.0
|
413
413
|
type: :runtime
|
414
414
|
prerelease: false
|
415
415
|
version_requirements: !ruby/object:Gem::Requirement
|
416
416
|
requirements:
|
417
417
|
- - '='
|
418
418
|
- !ruby/object:Gem::Version
|
419
|
-
version: 0.
|
419
|
+
version: 0.12.0
|
420
420
|
- !ruby/object:Gem::Dependency
|
421
421
|
name: jekyll-theme-architect
|
422
422
|
requirement: !ruby/object:Gem::Requirement
|
@@ -700,6 +700,7 @@ extra_rdoc_files: []
|
|
700
700
|
files:
|
701
701
|
- ".rubocop.yml"
|
702
702
|
- bin/jekyll-v4-github-pages
|
703
|
+
- lib/_default_config.yml
|
703
704
|
- lib/github-pages.rb
|
704
705
|
- lib/github-pages/configuration.rb
|
705
706
|
- lib/github-pages/dependencies.rb
|