title: How do I insert/extract front matter from Blackfriday in Go?
body: <p>In jekyll you insert this at the top of your markdown and are able to insert them into your layouts:</p>
  
  <pre><code>---
  
  layout: post
  
  title: Blogging Like a Hacker
  
  ---
  </code></pre>
  
  <p>I need to do the same in Go using no frameworks or fancy packages. Just Golang.</p>
  
  <pre><code>import (
         "github.com/russross/blackfriday"
         "html/template"
         "io/ioutil"
         "net/http"
  )
  
  type webPost struct {
       Title       string
       Author      string
       Description string
       Body        template.HTML
  }
  
  
  
  func handlePost(res http.ResponseWriter, req *http.Request) {
  
            //Read in some markdown from a file
            input, _ := ioutil.ReadFile("test.md")
            //Render it into HTML
            output := blackfriday.MarkdownCommon(input)
  
            //I need the first three parameters to grab the front matter from test.md
            post := webPost{"title", "author", "a descritpion", template.HTML(output)}
            //Serve to client a template 
            templates.ExecuteTemplate(res, "Post", post)
  }
  </code></pre>