Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Making sure permalinks were set right, and only generating the url once
Browse files Browse the repository at this point in the history
  • Loading branch information
qrush committed Apr 25, 2009
1 parent 9da140f commit 080108b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions features/permalinks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
2 changes: 1 addition & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ def run_jekyll(opts = {})
bg = '&'
end

system "#{JEKYLL_PATH}" #>> /dev/null"
system "#{JEKYLL_PATH} >> /dev/null"
end
2 changes: 1 addition & 1 deletion lib/jekyll/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit 080108b

Please sign in to comment.