jekyll-github-metadata 2.1.0 → 2.1.1
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: b7d6a9d7c3a9fd754220e85041847e91bbb2e76c
|
4
|
+
data.tar.gz: c9a791c58406dd4a0d27ea000cef9fae610dd1d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f146d6c25bc4c245615e11021c8eef409d1f03d561a1c9aa8efc0dbf66f4d31e2c974f8cd69383e550d4a63fe0b7ec566b5b33135b7a93436def4f8cf1f34fd
|
7
|
+
data.tar.gz: 0069d3c00e5f1dbc64b0fcb07a060c29d3b0c3ff9516831bfd822036da8031574739ca548839914e58600bc3ad1e25f053ab93fa78147395241967332895821e
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "jekyll"
|
2
|
+
require "uri"
|
2
3
|
|
3
4
|
module Jekyll
|
4
5
|
module GitHubMetadata
|
@@ -11,13 +12,7 @@ module Jekyll
|
|
11
12
|
Jekyll::GitHubMetadata.log :debug, "Initializing..."
|
12
13
|
@site = site
|
13
14
|
site.config["github"] = github_namespace
|
14
|
-
|
15
|
-
# Set `site.url` and `site.baseurl` if unset and in production mode.
|
16
|
-
if Jekyll.env == "production"
|
17
|
-
site.config["url"] ||= drop.url
|
18
|
-
site.config["baseurl"] = drop.baseurl if site.config["baseurl"].to_s.empty?
|
19
|
-
end
|
20
|
-
|
15
|
+
set_url_and_baseurl_fallbacks!
|
21
16
|
@site = nil
|
22
17
|
end
|
23
18
|
|
@@ -37,6 +32,17 @@ module Jekyll
|
|
37
32
|
def drop
|
38
33
|
@drop ||= MetadataDrop.new(site)
|
39
34
|
end
|
35
|
+
|
36
|
+
# Set `site.url` and `site.baseurl` if unset and in production mode.
|
37
|
+
def set_url_and_baseurl_fallbacks!
|
38
|
+
return unless Jekyll.env == "production"
|
39
|
+
|
40
|
+
repo = drop.send(:repository)
|
41
|
+
site.config["url"] ||= repo.url_without_path
|
42
|
+
if site.config["baseurl"].to_s.empty? && !["", "/"].include?(repo.baseurl)
|
43
|
+
site.config["baseurl"] = repo.baseurl
|
44
|
+
end
|
45
|
+
end
|
40
46
|
end
|
41
47
|
end
|
42
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-github-metadata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parker Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.
|
148
|
+
rubygems_version: 2.5.1
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: The site.github namespace
|