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

This commit is contained in:
Nick Quaranto 2009-04-25 01:07:05 -04:00
parent 9da140fcb2
commit 080108b0f0
3 changed files with 5 additions and 5 deletions

View File

@ -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 File

@ -14,5 +14,5 @@ def run_jekyll(opts = {})
bg = '&'
end
system "#{JEKYLL_PATH}" #>> /dev/null"
system "#{JEKYLL_PATH} >> /dev/null"
end

View File

@ -123,7 +123,7 @@ module Jekyll
def url
return permalink if permalink
{
@url ||= {
"year" => date.strftime("%Y"),
"month" => date.strftime("%m"),
"day" => date.strftime("%d"),