From 5868ba16911ca7eed5a195b0044dc657ef40bcb9 Mon Sep 17 00:00:00 2001 From: Mike Callan Date: Thu, 29 May 2014 14:21:43 -0500 Subject: [PATCH 1/2] new test to prove permalinks in global config do not respect template variables --- features/permalink_default.feature | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 features/permalink_default.feature diff --git a/features/permalink_default.feature b/features/permalink_default.feature new file mode 100644 index 00000000..0e471d6b --- /dev/null +++ b/features/permalink_default.feature @@ -0,0 +1,9 @@ +Feature: postpermalink defaults + Scenario: Define permalink default for posts + Given I have a _posts directory + And I have the following post: + | title | date | category | content | + | testpost | 2013-10-14 | blog | blabla | + And I have a configuration file with "defaults" set to "[{scope: {path: "", type: "post"}, values: {permalink: ":categories/:title"}}]" + When I run jekyll build + Then I should see "blabla" in "blog/testpost/index.html" From 87500addd5d6d89c0646ed7ca3c4ef781cc6b1d3 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 17 Jan 2015 15:46:35 -0800 Subject: [PATCH 2/2] Move the test & fix it. --- features/frontmatter_defaults.feature | 9 +++++++++ features/permalink_default.feature | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 features/permalink_default.feature diff --git a/features/frontmatter_defaults.feature b/features/frontmatter_defaults.feature index 0d0578e2..3ebfd59c 100644 --- a/features/frontmatter_defaults.feature +++ b/features/frontmatter_defaults.feature @@ -100,6 +100,15 @@ Feature: frontmatter defaults And I should see "nothing" in "_site/override.html" But the "_site/perma.html" file should not exist + Scenario: Define permalink default for posts + Given I have a _posts directory + And I have the following post: + | title | date | category | content | + | testpost | 2013-10-14 | blog | blabla | + And I have a configuration file with "defaults" set to "[{scope: {path: "", type: "posts"}, values: {permalink: "/:categories/:title/"}}]" + When I run jekyll build + Then I should see "blabla" in "_site/blog/testpost/index.html" + Scenario: Use frontmatter defaults in collections Given I have a _slides directory And I have a "index.html" file that contains "nothing" diff --git a/features/permalink_default.feature b/features/permalink_default.feature deleted file mode 100644 index 0e471d6b..00000000 --- a/features/permalink_default.feature +++ /dev/null @@ -1,9 +0,0 @@ -Feature: postpermalink defaults - Scenario: Define permalink default for posts - Given I have a _posts directory - And I have the following post: - | title | date | category | content | - | testpost | 2013-10-14 | blog | blabla | - And I have a configuration file with "defaults" set to "[{scope: {path: "", type: "post"}, values: {permalink: ":categories/:title"}}]" - When I run jekyll build - Then I should see "blabla" in "blog/testpost/index.html"