Kask

Reuse

It makes sense to define the page layout for multiple pages of a section from one place; even when some pages of the section needs customizations. In those circumstances you can define the page template inside the .kask or even .kask/propagate folders. Which directs Kask to use those as the default "page" template when the subfolders, or files of the folder don’t override it.

{{define "page"}}
<html>
  <head>
    <title>{{template "title" .}}</title>
  </head>
  <body>{{template "page-content" .}}</body>
</html>
{{end}}

{{define "markdown-page"}}
<html>
  <head></head>
  <body>
    <main>{{trustedHtml .Markdown.Content}}</main
    <aside>{{trustedHtml .Markdown.Toc}}</aside>
  </body>
</html>
{{end}}
.kask/propagate/page.tmpl
{{define "title"}}Lorem ipsum dolor sit amet.{{end}}

{{define "page-content"}}
{{.Date}}
{{end}}
contact.tmpl

Also, moving the "page" template into .kask/propagate will make it available for pages inside subfolders.