If I have a Markdown file like this:
---
title: The Title
---
# Some other title
Some content.
it is easy to get the Frontmatter data with current_page.data.title
but how would I get just the:
# Some other title
Some content
Part of the file. I tried current_page.content
but that did not work. In the end I ended up using current_page.source_file
and then manually stripping out the Frontmatter part but that is just ugly. It seems that Frontmatter should return both the data and the other content as well. I checked the Frontmatter code but most of the methods needed for this were private. I was just wondering if there is an obvious solution I am missing due to being newer to Middleman. If not do other people think this would be useful I could create a pull request to make current_page.content return just the Markdown content of the page minus the Frontmatter data.
The reason I need this is I want to parse out a table of contents for my page. The TOC generator though chokes on the Frontmatter data so I have to pass it clean Markdown.
Thanks
David