mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-06 03:01:43 -04:00
Fix rendering Liquid constructs in excerpts (#6945)
Merge pull request 6945
This commit is contained in:
@@ -34,6 +34,25 @@ Feature: Post excerpts
|
||||
And I should see exactly "<p>content for entry1.</p>" in "_site/2007/12/31/entry1.html"
|
||||
And I should see exactly "<p>content for entry1.</p>" in "_site/index.html"
|
||||
|
||||
Scenario: An excerpt with Liquid constructs from a post with a layout
|
||||
Given I have an "index.html" page that contains "{% for post in site.posts %}{{ post.excerpt }}{% endfor %}"
|
||||
And I have a configuration file with "baseurl" set to "/blog"
|
||||
And I have a _posts directory
|
||||
And I have a _layouts directory
|
||||
And I have a post layout that contains "{{ page.excerpt }}"
|
||||
And I have the following posts:
|
||||
| title | date | layout | content |
|
||||
| entry1 | 2007-12-31 | post | {{ 'assets/style.css' \| relative_url }} |
|
||||
When I run jekyll build
|
||||
Then I should get a zero exit status
|
||||
And the _site directory should exist
|
||||
And the _site/2007 directory should exist
|
||||
And the _site/2007/12 directory should exist
|
||||
And the _site/2007/12/31 directory should exist
|
||||
And the "_site/2007/12/31/entry1.html" file should exist
|
||||
And I should see exactly "<p>/blog/assets/style.css</p>" in "_site/2007/12/31/entry1.html"
|
||||
And I should see exactly "<p>/blog/assets/style.css</p>" in "_site/index.html"
|
||||
|
||||
Scenario: An excerpt from a post with a layout which has context
|
||||
Given I have an "index.html" page that contains "{% for post in site.posts %}{{ post.excerpt }}{% endfor %}"
|
||||
And I have a _posts directory
|
||||
|
||||
Reference in New Issue
Block a user