convert a markdown file into HTML and extract YAML front matter