middleman-sitemap 0.0.8 → 0.0.9
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/features/multiple_sitemaps.feature +29 -0
- data/lib/middleman-sitemap/extension.rb +1 -0
- data/middleman-sitemap.gemspec +1 -1
- data/templates/sitemapindex.xml.erb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43062a33c19dde7407fea248e17a4a013f23c09c
|
|
4
|
+
data.tar.gz: af451adf3cf0b0889010d1a5eafb97ceb0f9ba39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a416323aff24bb4d4cbd8084ca6fec096faf45281e186b949208c076f34da9c9d72c9a602902f8840db674be8f758a1622fd065a06b61e1fde3e597275d5c065
|
|
7
|
+
data.tar.gz: 5000714186f0f55f5627242c73a62a1b581b794a0606bc6b5a8f9a52bc93096a29465d0b336f8a00e1785e26e84a9514a48add4f95459b071c11ba0419fac375
|
|
@@ -13,6 +13,35 @@ Feature: Multiple sitemaps for large sites
|
|
|
13
13
|
| build/sitemap1.xml |
|
|
14
14
|
| build/sitemap2.xml |
|
|
15
15
|
|
|
16
|
+
@slow @announce
|
|
17
|
+
Scenario: Sitemap index should have proper content
|
|
18
|
+
Given a successfully built app at "large-site-app"
|
|
19
|
+
When I cd to "build"
|
|
20
|
+
Then the file "sitemap.xml" should contain "</sitemapindex>"
|
|
21
|
+
And the file "sitemap.xml" should contain "http://www.example.com/sitemap1.xml.gz"
|
|
22
|
+
And the file "sitemap.xml" should contain "http://www.example.com/sitemap2.xml.gz"
|
|
23
|
+
|
|
24
|
+
@slow @announce
|
|
25
|
+
Scenario: Sitemap index should have proper URLs when GZIP is false
|
|
26
|
+
Given a fixture app "large-site-app"
|
|
27
|
+
And a file named "config.rb" with:
|
|
28
|
+
"""
|
|
29
|
+
activate :sitemap, :gzip => false
|
|
30
|
+
"""
|
|
31
|
+
And a successfully built app at "large-site-app"
|
|
32
|
+
When I cd to "build"
|
|
33
|
+
Then the file "sitemap.xml" should contain "</sitemapindex>"
|
|
34
|
+
And the file "sitemap.xml" should contain "http://www.example.com/sitemap1.xml"
|
|
35
|
+
And the file "sitemap.xml" should contain "http://www.example.com/sitemap2.xml"
|
|
36
|
+
|
|
37
|
+
@slow @announce
|
|
38
|
+
Scenario: Sitemaps should have proper content
|
|
39
|
+
Given a successfully built app at "large-site-app"
|
|
40
|
+
When I cd to "build"
|
|
41
|
+
Then the file "sitemap1.xml" should contain "</urlset>"
|
|
42
|
+
And the file "sitemap1.xml" should contain "http://www.example.com/page00001.html"
|
|
43
|
+
And the file "sitemap2.xml" should contain "http://www.example.com/page50000.html"
|
|
44
|
+
|
|
16
45
|
Scenario: Small site should have multiple sitemaps
|
|
17
46
|
Given a successfully built app at "gzip-app"
|
|
18
47
|
Then the following files should not exist:
|
|
@@ -39,6 +39,7 @@ class Sitemap < ::Middleman::Extension
|
|
|
39
39
|
def build_sitemap_index(sitemaps)
|
|
40
40
|
@hostname = options.hostname
|
|
41
41
|
@sitemaps = sitemaps
|
|
42
|
+
@ext = options.gzip ? ".xml.gz" : ".xml"
|
|
42
43
|
template = Tilt::ERBTemplate.new(File.expand_path(File.join("#{File.dirname(__FILE__)}", "../../templates/sitemapindex.xml.erb")))
|
|
43
44
|
sitemap = template.render(self)
|
|
44
45
|
|
data/middleman-sitemap.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
3
3
|
<% 1.upto(@sitemaps) do |idx| %>
|
|
4
4
|
<sitemap>
|
|
5
|
-
<loc><%= @hostname %>/sitemap<%= idx
|
|
5
|
+
<loc><%= @hostname %>/sitemap<%= idx %><%= @ext %></loc>
|
|
6
6
|
<lastmod><%= Date.today.to_time.iso8601 %></lastmod>
|
|
7
7
|
</sitemap>
|
|
8
8
|
<% end %>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: middleman-sitemap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Larry Staton Jr.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-03-
|
|
11
|
+
date: 2014-03-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: middleman-core
|