Easy layouts

default_layout = ->(**props) {
  html {
    head {
      title(props[:title])
    }
    body {
      container {
        render_children(**props)
      }
    }
  }
}

article_layout = default_layout.apply { |**props|
  article {
    h1 props[:title]
    markdown props[:md]
  }
}

Papercraft.html(article_layout, **article)