nirvdrum-jekyll 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  gem 'jeweler', '>= 0.11.0'
7
7
  require 'jeweler'
8
8
  Jeweler::Tasks.new do |s|
9
- s.name = "jekyll"
9
+ s.name = "nirvdrum-jekyll"
10
10
  s.summary = %Q{Jekyll is a simple, blog aware, static site generator.}
11
11
  s.email = "tom@mojombo.com"
12
12
  s.homepage = "http://github.com/mojombo/jekyll"
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 6
4
- :patch: 0
4
+ :patch: 1
@@ -26,11 +26,13 @@ Feature: Fancy permalinks
26
26
  Scenario: Use pretty permalink schema for pages
27
27
  Given I have an "index.html" page that contains "Totally index"
28
28
  And I have an "awesome.html" page that contains "Totally awesome"
29
+ And I have an "sitemap.xml" page that contains "Totally uhm, sitemap"
29
30
  And I have a configuration file with "permalink" set to "pretty"
30
31
  When I run jekyll
31
32
  Then the _site directory should exist
32
33
  And I should see "Totally index" in "_site/index.html"
33
34
  And I should see "Totally awesome" in "_site/awesome/index.html"
35
+ And I should see "Totally uhm, sitemap" in "_site/sitemap.xml"
34
36
 
35
37
  Scenario: Use custom permalink schema with prefix
36
38
  Given I have a _posts directory
data/jekyll.gemspec CHANGED
@@ -1,12 +1,15 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
1
4
  # -*- encoding: utf-8 -*-
2
5
 
3
6
  Gem::Specification.new do |s|
4
7
  s.name = %q{jekyll}
5
- s.version = "0.6.0"
8
+ s.version = "0.6.1"
6
9
 
7
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
11
  s.authors = ["Tom Preston-Werner"]
9
- s.date = %q{2009-06-28}
12
+ s.date = %q{2010-02-11}
10
13
  s.default_executable = %q{jekyll}
11
14
  s.description = %q{Jekyll is a simple, blog aware, static site generator.}
12
15
  s.email = %q{tom@mojombo.com}
@@ -76,6 +79,7 @@ Gem::Specification.new do |s|
76
79
  "test/source/css/screen.css",
77
80
  "test/source/foo/_posts/bar/2008-12-12-topical-post.textile",
78
81
  "test/source/index.html",
82
+ "test/source/sitemap.xml",
79
83
  "test/source/win/_posts/2009-05-24-yaml-linebreak.markdown",
80
84
  "test/source/z_category/_posts/2008-9-23-categories.textile",
81
85
  "test/suite.rb",
@@ -93,7 +97,7 @@ Gem::Specification.new do |s|
93
97
  s.rdoc_options = ["--charset=UTF-8"]
94
98
  s.require_paths = ["lib"]
95
99
  s.rubyforge_project = %q{jekyll}
96
- s.rubygems_version = %q{1.3.4}
100
+ s.rubygems_version = %q{1.3.5}
97
101
  s.summary = %q{Jekyll is a simple, blog aware, static site generator.}
98
102
  s.test_files = [
99
103
  "test/helper.rb",
@@ -137,3 +141,4 @@ Gem::Specification.new do |s|
137
141
  s.add_dependency(%q<open4>, [">= 0.9.6"])
138
142
  end
139
143
  end
144
+
data/lib/jekyll/page.rb CHANGED
@@ -57,7 +57,7 @@ module Jekyll
57
57
  def url
58
58
  return permalink if permalink
59
59
 
60
- @url ||= template.gsub(':name', basename)
60
+ @url ||= (ext == '.html') ? template.gsub(':name', basename) : "/#{name}"
61
61
  end
62
62
 
63
63
  # Extract information from the page filename
@@ -91,7 +91,7 @@ module Jekyll
91
91
 
92
92
  # The url needs to be unescaped in order to preserve the correct filename
93
93
  path = File.join(dest, CGI.unescape(self.url))
94
- if self.url[/\.html$/].nil?
94
+ if self.ext == '.html' && self.url[/\.html$/].nil?
95
95
  FileUtils.mkdir_p(path)
96
96
  path = File.join(path, "index.html")
97
97
  end
@@ -0,0 +1,23 @@
1
+ ---
2
+ layout: nil
3
+ ---
4
+ <?xml version="1.0" encoding="UTF-8"?>
5
+ <urlset
6
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
7
+
8
+ <url>
9
+ <loc>http://example.com</loc>
10
+ <lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
11
+ <changefreq>daily</changefreq>
12
+ <priority>1.0</priority>
13
+ </url>
14
+
15
+ {% for post in site.posts %}
16
+ <url>
17
+ <loc>http://example.com/{{ post.url }}/</loc>
18
+ <lastmod>{{ site.time }}</lastmod>
19
+ <changefreq>monthly</changefreq>
20
+ <priority>0.2</priority>
21
+ </url>
22
+ {% endfor %}
23
+ </urlset>
data/test/test_page.rb CHANGED
@@ -81,6 +81,17 @@ class TestPage < Test::Unit::TestCase
81
81
  assert File.exists?(File.join(dest_dir, 'contacts', 'index.html'))
82
82
  end
83
83
 
84
+ should "write properly with extension different from html" do
85
+ page = setup_page("sitemap.xml")
86
+ page.site.permalink_style = :pretty
87
+ do_render(page)
88
+ page.write(dest_dir)
89
+
90
+ assert_equal("/sitemap.xml", page.url)
91
+ assert_nil(page.url[/\.html$/])
92
+ assert File.directory?(dest_dir)
93
+ assert File.exists?(File.join(dest_dir,'sitemap.xml'))
94
+ end
84
95
  end
85
96
 
86
97
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nirvdrum-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-28 00:00:00 -07:00
12
+ date: 2010-02-11 00:00:00 -05:00
13
13
  default_executable: jekyll
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -142,6 +142,7 @@ files:
142
142
  - test/source/css/screen.css
143
143
  - test/source/foo/_posts/bar/2008-12-12-topical-post.textile
144
144
  - test/source/index.html
145
+ - test/source/sitemap.xml
145
146
  - test/source/win/_posts/2009-05-24-yaml-linebreak.markdown
146
147
  - test/source/z_category/_posts/2008-9-23-categories.textile
147
148
  - test/suite.rb
@@ -154,8 +155,10 @@ files:
154
155
  - test/test_site.rb
155
156
  - test/test_stylesheet.rb
156
157
  - test/test_tags.rb
157
- has_rdoc: false
158
+ has_rdoc: true
158
159
  homepage: http://github.com/mojombo/jekyll
160
+ licenses: []
161
+
159
162
  post_install_message:
160
163
  rdoc_options:
161
164
  - --charset=UTF-8
@@ -176,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
179
  requirements: []
177
180
 
178
181
  rubyforge_project: jekyll
179
- rubygems_version: 1.2.0
182
+ rubygems_version: 1.3.5
180
183
  signing_key:
181
184
  specification_version: 3
182
185
  summary: Jekyll is a simple, blog aware, static site generator.