I want to create content snippets for my home page. An example post looks something like
<p>Your favorite Harry Potter characters enter the Game of Thrones
universe, and you'll never guess what happens!</p>
<readmore/>
<p>...they all die</p>
On the home page I only want the things before <readmore/>
to show up. I'm thinking the I can use Beautiful Soup in a Jinja filter to cut out the readmore and all the content after it. It should clip at the first newline or paragraph end if no <readmore/>
is present.
How can I do this?