I constantly run into this problem when I try to build a blog –
RuntimeError: Blog post blog/test_post/index.html needs a date in its filename or frontmatter
Even though there is a date in the frontmatter. This comes up whenever I try to build a blog outside of root.
Blog article files are named, for example, “test_post.html.md” and directory indexes are activated. All the files are in a separate directory called blog. The blog is activated in config.rb with the following –
activate :blog do |blog|
blog.name = "blog"
blog.prefix = "blog"
blog.sources = "{title}.html"
blog.layout = "layouts/blog-post"
blog.permalink = "{title}"
blog.default_extension = ".md"
end
The frontmatter does contain date information. Is there some sort of setting that I am missing that is somehow telling Middleman not to look in the frontmatter as it is trying to parse the article, because of html in the filepath name? That’s the best I can think of, but when I exclude it, it does not create an html document readable in the browser.