bridgetownrb / bridgetown-haml

A Bridgetown plugin which provides support for Haml templates.
MIT License
3 stars 1 forks source link

Support for nested layouts via YAML front-matter in .HAML files #2

Open infews opened 1 year ago

infews commented 1 year ago

Given:

src/layouts/
- default.haml
- page.haml

and page.haml:

-#
  ---
   layout: default
  ---

A markdown file that references a the page layout:

---
title: a post
layout: page
---

page.haml is loaded as a layout, but default.haml is not. This does work for Liquid templates.

I'm happy to take a look at how to implement this if you have some tips. I don't know enough (yet) about how Bridgetown works to do this.