When a post does not contain an excerpt_separator, meaning the excerpt includes the entire post, the excerpt should contain exactly the post content. This is desirable both from a correctness standpoint, that the excerpt should not introduce any new content, and more practically to allow fast and easy detection of whole-post excerpts in Liquid templates using `post.excerpt == post.content`. A common use-case is deciding whether to render "Read More" links on a page containing post excerpts. This commit does exactly that. It avoids adding additional newlines to the excerpt content when the excerpt includes the whole post and adds tests to ensure that this behavior is correct and preserved going forward. Signed-off-by: Kevin Locke <kevin@kevinlocke.name> |
||
---|---|---|
.. | ||
jekyll | ||
site_template | ||
jekyll.rb |