Dynamic Titles With Middleman

programming

I’ve been experimenting with Middleman for a new static, non-blog site that I am working on. Figuring out how to give my template a dynamic title was much harder than it should have been, because the relevant section of the documentation doesn’t actually mention titles at all. The end result: all of the YAML frontmatter in your page file is accessed via the current_page.data object, so your title is current_page.data.title. Enjoy!


I'm looking for better ways to build software businesses. Find out if I find something.