def extract_excerpt(doc_content)
      head, _, tail = doc_content.to_s.partition(doc.excerpt_separator)

      if tail.empty?
        head
      else
        "" << head << "\n\n" << tail.scan(%r!^ {0,3}\[[^\]]+\]:.+$!).join("\n")
      end
    end
def extract_excerpt(doc_content)
      head, _, tail = doc_content.to_s.partition(doc.excerpt_separator)

      if tail.empty?
        head
      else
        "" << head << "\n\n" << tail.scan(%r!^ {0,3}\[[^\]]+\]:.+$!).join("\n")
      end
    end
Internal: Extract excerpt from the content

 By default excerpt is your first paragraph of a doc: everything before
 the first two new lines:

     ---
     title: Example
     ---

     First paragraph with [link][1].

     Second paragraph.

     [1]: http://example.com/

 This is fairly good option for Markdown and Textile files. But might cause
 problems for HTML docs (which is quite unusual for Bunto). If default
 excerpt delimiter is not good for you, you might want to set your own via
 configuration option `excerpt_separator`. For example, following is a good
 alternative for HTML docs:

     # file: _config.yml
     excerpt_separator: "<!-- more -->"

 Notice that all markdown-style link references will be appended to the
 excerpt. So the example doc above will have this excerpt source:

     First paragraph with [link][1].

     [1]: http://example.com/

 Excerpts are rendered same time as content is rendered.

 Returns excerpt String