Hot to get article body without the summary for Middleman blog

I’m using the middleman blog article.summary feature to add article summaries to a blog index page. On the article page I’d like to wrap the summary to style it differently to the rest of the article:

<div class="summary">
  <%= article.summary %>
</div>

<%= article.body %>

However this repeats the summary text.

Is it possible to get the article body without the summary without doing something like this:

<%= current_article.body.sub(current_article.summary, '') %>

I usually create another front matter named excerpt and ignore the summary auto stuff all together.

This way if you separate at the start you can concatenate later.

Otherwise what you are suggesting sounds the best way - or using nokogiri in some fashion.

Another option is to use regular expressions to cut out the summary. Just a replace.
Although t not efficient, it’s still good considering the pages are generated offline.

Alternatively you create two new custom functions.