EnigmaCurry/blogofile_blog — pull request #25 by jidn (2013-01-25 17:18:18+00:00)
Title: Create excerpts using XPATH and HTML comment.

Frustrated with inflexible [Blogofile](http://blogofile.com) excerpts?
Wouldn't you like to pick where the excerpt ended in each post?
Here is a solution where blogofile will search for a
comment containing a magic phrase in your blog post and cut it off there.
You can see an example with ~/category/blogofile when the included post 009* is included.

Inside \_config.py add the following lines

blog.post_excerpts.enabled = True
blog.post_excerpts.xpath = "//comment()[normalize-space(.)='TEASER']"

This looks for a comments which has "TEASER" as the only text.
In your post, place an HTML comment; which for markdown, is.
`` where the excerpt should finish. If
the comment can not be found, blogofile uses the classic behavior, a set
number of words as defined by `blog.post_excerpts.word_length`.

By using XPATH, you are not limited to a HTML comment. You can change to
other behaviors using the appropriate XPATH expression; the first paragraph
of a post comes to mind.