jekyll-redirect-from 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.markdown +4 -0
- data/jekyll-redirect-from.gemspec +1 -0
- data/lib/jekyll-redirect-from/redirector.rb +3 -0
- data/lib/jekyll-redirect-from/version.rb +1 -1
- data/spec/fixtures/_config.yml +1 -0
- data/spec/jekyll_redirect_from/redirector_spec.rb +4 -0
- data/spec/spec_helper.rb +4 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e29fdfc5ac1b72c7be5187053ee376a95962914
|
4
|
+
data.tar.gz: b310df2a84a1580f82e96c6e70d0de9ed25c94b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e68b428d29435e1b3f6005870bdc094f4f7a2b9b2d48800374a948d202a7fe86bc0745236647c78cc5c7eacdba23232b8c5d994dd15ac4fa8e3a876f61782f9
|
7
|
+
data.tar.gz: fec31c22903b47943f2e16f8bd4d91977a9fbbf65f2955e823e7cb6a8d36ee095bd8105d7ab1783ce68c370095213747ebfc43de7003ef1a80d130cf94ebfc8b
|
data/History.markdown
CHANGED
@@ -15,14 +15,17 @@ module JekyllRedirectFrom
|
|
15
15
|
alt_urls(item).each do |alt_url|
|
16
16
|
redirect_page = RedirectPage.new(site, site.source, "", "")
|
17
17
|
redirect_page.data['permalink'] = alt_url
|
18
|
+
redirect_page.data['sitemap'] = false
|
18
19
|
redirect_page.generate_redirect_content(redirect_url(site, item))
|
19
20
|
site.pages << redirect_page
|
20
21
|
end
|
21
22
|
end
|
22
23
|
if has_redirect_to_url?(item)
|
23
24
|
redirect_to_url(item).flatten.each do |alt_url|
|
25
|
+
item.data['sitemap'] = false
|
24
26
|
redirect_page = RedirectPage.new(site, site.source, File.dirname(item.url), File.basename(item.url))
|
25
27
|
redirect_page.data['permalink'] = item.url
|
28
|
+
redirect_page.data['sitemap'] = false
|
26
29
|
redirect_page.generate_redirect_content(alt_url)
|
27
30
|
if item.is_a?(Jekyll::Document)
|
28
31
|
item.content = item.output = redirect_page.content
|
data/spec/fixtures/_config.yml
CHANGED
@@ -38,6 +38,10 @@ describe JekyllRedirectFrom::Redirector do
|
|
38
38
|
expect(redirector.redirect_to_url(page_with_many_redirect_to)).to eql(["https://www.jekyllrb.com"])
|
39
39
|
end
|
40
40
|
|
41
|
+
it "does not include pages with a redirect in sitemap" do
|
42
|
+
expect(destination_sitemap).not_to include(%|one_redirect_to.html|)
|
43
|
+
end
|
44
|
+
|
41
45
|
context "refresh page generation" do
|
42
46
|
before(:each) do
|
43
47
|
described_class.new.generate(@site)
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-redirect-from
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parker Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: jekyll-sitemap
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.8.1
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.8.1
|
69
83
|
description: Seamlessly specify multiple redirection URLs for your pages and posts
|
70
84
|
email:
|
71
85
|
- parkrmoore@gmail.com
|
@@ -123,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
137
|
version: '0'
|
124
138
|
requirements: []
|
125
139
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.2.
|
140
|
+
rubygems_version: 2.2.3
|
127
141
|
signing_key:
|
128
142
|
specification_version: 4
|
129
143
|
summary: Seamlessly specify multiple redirection URLs for your pages and posts
|