Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 66 lines (59 sloc) 3.222 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
Feature: Fancy permalinks
As a hacker who likes to blog
I want to be able to set permalinks
In order to make my blog URLs awesome

Scenario: Use none permalink schema
Given I have a _posts directory
And I have the following post:
| title | date | content |
| None Permalink Schema | 3/27/2009 | Totally nothing. |
And I have a configuration file with "permalink" set to "none"
When I run jekyll
Then the _site directory should exist
And I should see "Totally nothing." in "_site/none-permalink-schema.html"

Scenario: Use pretty permalink schema
Given I have a _posts directory
And I have the following post:
| title | date | content |
| Pretty Permalink Schema | 3/27/2009 | Totally wordpress. |
And I have a configuration file with "permalink" set to "pretty"
When I run jekyll
Then the _site directory should exist
And I should see "Totally wordpress." in "_site/2009/03/27/pretty-permalink-schema/index.html"

Scenario: Use pretty permalink schema for pages
Given I have an "index.html" page that contains "Totally index"
And I have an "awesome.html" page that contains "Totally awesome"
And I have an "sitemap.xml" page that contains "Totally uhm, sitemap"
And I have a configuration file with "permalink" set to "pretty"
When I run jekyll
Then the _site directory should exist
And I should see "Totally index" in "_site/index.html"
And I should see "Totally awesome" in "_site/awesome/index.html"
And I should see "Totally uhm, sitemap" in "_site/sitemap.xml"

Scenario: Use custom permalink schema with prefix
Given I have a _posts directory
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"
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"

Scenario: Use custom permalink schema with category
Given I have a _posts directory
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 "/: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"

Scenario: Use custom permalink schema with squished date
Given I have a _posts directory
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"
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"
Something went wrong with that request. Please try again.