Slices a Markdown file in segments, generates HTML, and applies a template to the result.