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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfb1076c07c42f81fb9f4e91d8b7a1e9959e2d58
4
- data.tar.gz: 9ffd8729f7adc022c572bf6325b4207c5bbb5436
3
+ metadata.gz: 1e29fdfc5ac1b72c7be5187053ee376a95962914
4
+ data.tar.gz: b310df2a84a1580f82e96c6e70d0de9ed25c94b4
5
5
  SHA512:
6
- metadata.gz: f1341b8ec5a41ea28ad1954b148d5b03203842fbe9f631f233ab5a6eea53fd35f9cd178f026e733d8cfe6ca7fc8fff0f4bc2cd7bb7c689851feb7c692b663af8
7
- data.tar.gz: 32563503dd3d74bf0c3efb15dcbcc83255c6af1d3a78500532aa4263e553872cdfe61fcbc98b99b9a6078bd4c247568726fe29a69c0a6fef53b982e7b66c6980
6
+ metadata.gz: 4e68b428d29435e1b3f6005870bdc094f4f7a2b9b2d48800374a948d202a7fe86bc0745236647c78cc5c7eacdba23232b8c5d994dd15ac4fa8e3a876f61782f9
7
+ data.tar.gz: fec31c22903b47943f2e16f8bd4d91977a9fbbf65f2955e823e7cb6a8d36ee095bd8105d7ab1783ce68c370095213747ebfc43de7003ef1a80d130cf94ebfc8b
data/History.markdown CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.8.0 / 2015-05-20
2
+
3
+ * Exclude redirect pages from sitemap (#69)
4
+
1
5
  ## 0.7.0 / 2015-03-16
2
6
 
3
7
  * Remove spaces in redirect page (#62)
@@ -23,4 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "bundler", "~> 1.3"
24
24
  spec.add_development_dependency "rake"
25
25
  spec.add_development_dependency "rspec"
26
+ spec.add_development_dependency "jekyll-sitemap", "~> 0.8.1"
26
27
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module JekyllRedirectFrom
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
@@ -1,6 +1,7 @@
1
1
  url: http://jekyllrb.com
2
2
  gems:
3
3
  - jekyll-redirect-from
4
+ - jekyll-sitemap
4
5
  collections:
5
6
  articles:
6
7
  output: true
@@ -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
@@ -74,4 +74,8 @@ RSpec.configure do |config|
74
74
  page.data['permalink'] = permalink
75
75
  page
76
76
  end
77
+
78
+ def destination_sitemap
79
+ File.read(File.join(@dest.to_s, 'sitemap.xml'))
80
+ end
77
81
  end
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.7.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-03-17 00:00:00.000000000 Z
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.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