jekyll-sitemap 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: 63fc14261e170a339f8c31cb7944a2dff1701aa0
4
- data.tar.gz: 8ac3ae2638c6aaa04aa295bfccb80a6e4dd24c36
3
+ metadata.gz: b3323b2de7ce9cc47a7b7b19c452d9bf1cef594c
4
+ data.tar.gz: 01899664a48e7ab22b86c53db7f77eec4a0c2920
5
5
  SHA512:
6
- metadata.gz: 425ab53b7c2f6f6c1348e96cd2549d63f07984319358c0225dd42d8308e7b2c5c845765caa933a3188170abda1bb3b88d46b785bf4d47f15cbc1a50003c568d7
7
- data.tar.gz: 09e7485fd2663ed700ecfdd9ded5a05455c5e46a82f82236bfad375c29c96704dd77653e0af11ab76a58f2051dcd2dd541b0288412190d51095e3f154b0a95da
6
+ metadata.gz: b29609605902d444e50be0d6880b0398ee705f8dac8e9d1b8cd8323b58791347c53723a9acc221d32e6e409455eacb7a87b99922c0b9c2031dfe5c5327de4240
7
+ data.tar.gz: b3c3da0e33fb40c8145270326dc92614134d8cb8684f8eef0f5ab03647cd78542454118b5771a8948777c285ce88e917e99c31048112091949fd5c8c29fae582
data/History.markdown CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.8.0 / 2015-02-03
2
+
3
+ * Call each page `page` in pages loop in `sitemap.xml` for clarity (#64)
4
+ * Remove `changefreq` (#34)
5
+ * Remove `priority` (#33)
6
+ * Don't strip 'index.html' when there is more to filename (#68)
7
+
1
8
  ## 0.7.0 / 2014-12-07
2
9
 
3
10
  ## Minor Enhancements
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "jekyll-sitemap"
5
5
  spec.summary = "Automatically generate a sitemap.xml for your Jekyll site."
6
- spec.version = "0.7.0"
6
+ spec.version = "0.8.0"
7
7
  spec.authors = ["GitHub, Inc."]
8
8
  spec.email = "support@github.com"
9
9
  spec.homepage = "https://github.com/jekyll/jekyll-sitemap"
data/lib/sitemap.xml CHANGED
@@ -9,24 +9,19 @@
9
9
  {% else %}
10
10
  <lastmod>{{ post.date | date_to_xmlschema }}</lastmod>
11
11
  {% endif %}
12
- <priority>0.8</priority>
13
12
  </url>
14
13
  {% endunless %}{% endfor %}
15
- {% for post in site.html_pages %}{% unless post.sitemap == false %}
14
+ {% for page in site.html_pages %}{% unless page.sitemap == false %}
16
15
  <url>
17
- <loc>{{ post.url | replace:'index.html','' | prepend: site_url }}</loc>
16
+ <loc>{{ page.url | replace:'/index.html','/' | prepend: site_url }}</loc>
18
17
  <lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
19
- <changefreq>weekly</changefreq>
20
- <priority>{% if post.url == "/" or post.url == "/index.html" %}1.0{% else %}0.7{% endif %}</priority>
21
18
  </url>
22
19
  {% endunless %}{% endfor %}
23
20
  {% for collection in site.collections %}{% unless collection.last.output == false %}
24
21
  {% for doc in collection.last.docs %}{% unless doc.sitemap == false %}
25
22
  <url>
26
- <loc>{{ doc.url | replace:'index.html','' | prepend: site_url }}</loc>
23
+ <loc>{{ doc.url | replace:'/index.html','/' | prepend: site_url }}</loc>
27
24
  <lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
28
- <changefreq>weekly</changefreq>
29
- <priority>{% if doc.url == "/" or doc.url == "/index.html" %}1.0{% else %}0.7{% endif %}</priority>
30
25
  </url>
31
26
  {% endunless %}{% endfor %}
32
27
  {% endunless %}{% endfor %}
@@ -34,7 +29,6 @@
34
29
  <url>
35
30
  <loc>{{ file.path | prepend: site_url }}</loc>
36
31
  <lastmod>{{ file.modified_time | date_to_xmlschema }}</lastmod>
37
- <priority>0.6</priority>
38
32
  </url>
39
33
  {% endfor %}
40
34
  </urlset>
@@ -0,0 +1,4 @@
1
+ ---
2
+ ---
3
+
4
+ The permalink of this page does not end with a '/', but with a filename
@@ -29,15 +29,15 @@ describe(Jekyll::JekyllSitemap) do
29
29
  expect(File.exist?(dest_dir("sitemap.xml"))).to be_truthy
30
30
  end
31
31
 
32
- it "sets the base URL for the site as priority 1.0" do
33
- expect(contents).to match /<loc>http:\/\/example\.org\/<\/loc>\s+<lastmod>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(-|\+)\d{2}:\d{2}<\/lastmod>\s+<changefreq>weekly<\/changefreq>\s+<priority>1\.0<\/priority>/
34
- end
35
-
36
32
  it "puts all the pages in the sitemap.xml file" do
37
33
  expect(contents).to match /<loc>http:\/\/example\.org\/<\/loc>/
38
34
  expect(contents).to match /<loc>http:\/\/example\.org\/some-subfolder\/this-is-a-subpage\.html<\/loc>/
39
35
  end
40
36
 
37
+ it "only strips 'index.html' from end of permalink" do
38
+ expect(contents).to match /<loc>http:\/\/example\.org\/some-subfolder\/test_index\.html<\/loc>/
39
+ end
40
+
41
41
  it "puts all the posts in the sitemap.xml file" do
42
42
  expect(contents).to match /<loc>http:\/\/example\.org\/2014\/03\/04\/march-the-fourth\.html<\/loc>/
43
43
  expect(contents).to match /<loc>http:\/\/example\.org\/2014\/03\/02\/march-the-second\.html<\/loc>/
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-sitemap
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
  - GitHub, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-08 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -101,6 +101,7 @@ files:
101
101
  - spec/fixtures/images/hubot.png
102
102
  - spec/fixtures/index.html
103
103
  - spec/fixtures/some-subfolder/exclude-this-page.html
104
+ - spec/fixtures/some-subfolder/test_index.html
104
105
  - spec/fixtures/some-subfolder/this-is-a-subfile.html
105
106
  - spec/fixtures/some-subfolder/this-is-a-subpage.html
106
107
  - spec/jekyll-sitemap_spec.rb
@@ -144,6 +145,7 @@ test_files:
144
145
  - spec/fixtures/images/hubot.png
145
146
  - spec/fixtures/index.html
146
147
  - spec/fixtures/some-subfolder/exclude-this-page.html
148
+ - spec/fixtures/some-subfolder/test_index.html
147
149
  - spec/fixtures/some-subfolder/this-is-a-subfile.html
148
150
  - spec/fixtures/some-subfolder/this-is-a-subpage.html
149
151
  - spec/jekyll-sitemap_spec.rb