Skip to content
Browse files

Making sure permalinks were set right, and only generating the url once

  • Loading branch information...
1 parent 9da140f commit 080108b0f0a5cc50aa1eefdc80dc2d03897baef7 @qrush qrush committed Apr 25, 2009
Showing with 5 additions and 5 deletions.
  1. +3 −3 features/permalinks.feature
  2. +1 −1 features/support/env.rb
  3. +1 −1 lib/jekyll/post.rb
View
6 features/permalinks.feature
@@ -28,7 +28,7 @@ Feature: Fancy permalinks
And I have the following post:
| title | category | date | content |
| Custom Permalink Schema | stuff | 3/27/2009 | Totally custom. |
- And I have a configuration file with "permalink" set to "blog/:year/:month/:day/:title"
+ And I have a configuration file with "permalink" set to "/blog/:year/:month/:day/:title"
When I run jekyll
Then the _site directory should exist
And I should see "Totally custom." in "_site/blog/2009/03/27/custom-permalink-schema/index.html"
@@ -38,7 +38,7 @@ Feature: Fancy permalinks
And I have the following post:
| title | category | date | content |
| Custom Permalink Schema | stuff | 3/27/2009 | Totally custom. |
- And I have a configuration file with "permalink" set to ":category/:title.html"
+ And I have a configuration file with "permalink" set to "/:categories/:title.html"
When I run jekyll
Then the _site directory should exist
And I should see "Totally custom." in "_site/stuff/custom-permalink-schema.html"
@@ -48,7 +48,7 @@ Feature: Fancy permalinks
And I have the following post:
| title | category | date | content |
| Custom Permalink Schema | stuff | 3/27/2009 | Totally custom. |
- And I have a configuration file with "permalink" set to ":month-:day-:year/:title.html"
+ And I have a configuration file with "permalink" set to "/:month-:day-:year/:title.html"
When I run jekyll
Then the _site directory should exist
And I should see "Totally custom." in "_site/03-27-2009/custom-permalink-schema.html"
View
2 features/support/env.rb
@@ -14,5 +14,5 @@ def run_jekyll(opts = {})
bg = '&'
end
- system "#{JEKYLL_PATH}" #>> /dev/null"
+ system "#{JEKYLL_PATH} >> /dev/null"
end
View
2 lib/jekyll/post.rb
@@ -123,7 +123,7 @@ def template
def url
return permalink if permalink
- {
+ @url ||= {
"year" => date.strftime("%Y"),
"month" => date.strftime("%m"),
"day" => date.strftime("%d"),

0 comments on commit 080108b

Please sign in to comment.
Something went wrong with that request. Please try again.