I am having trouble generating article summaries using the blog.summary.separator
. This is my first attempt with Middleman so no doubt it is a simple error on my part. No amount of DuckDuckGoing has helped me.
Setup
The blog.summary.separator
is set in config.rb
as:
blog.summary_separator = /(READMORE)/
The article markdown source file text is as follows:
Blog summary
READMORE
First paragraph.
Result
When I use article.body
this source text generates:
<p>Blog summary.</p>
<p></p>
<p>First paragraph.</p>
When I use article.summary
it generates:
<p>Blog summary.</p>
<p>
Why is it a problem?
I do not want the empty paragraph tag in the article body and as I am serving the built files using the application/xhtml+xml
media type, I definitely do not want the un-closed paragraph in the article summary.