diff --git a/features/embed_filters.feature b/features/embed_filters.feature index 27f5f1df..e0d85cbd 100644 --- a/features/embed_filters.feature +++ b/features/embed_filters.feature @@ -73,3 +73,19 @@ Feature: Embed filters Then the _site directory should exist And I should see exactly "Page-2, Page-1" in "_site/page-1.html" And I should see exactly "Page-2, Page-1" in "_site/page-2.html" + + Scenario: Sort pages by the title + Given I have a _layouts directory + And I have the following page: + | title | layout | content | + | Dog | default | Run | + And I have the following page: + | title | layout | content | + | Bird | default | Fly | + And I have the following page: + | layout | content | + | default | Jump | + And I have a default layout that contains "{% assign sorted_pages = site.pages | sort: 'title' %}The rule of {{ sorted_pages.size }}: {% for p in sorted_pages %}{{ p.content | strip_html | strip_newlines }}, {% endfor %}" + When I run jekyll build + Then the _site directory should exist + And I should see exactly "The rule of 3: Jump, Fly, Run," in "_site/bird.html"