Cascading template blocks

Currently we can set defines in themes/customtheme/layouts/_default/single.html like:

{{ define "title" }} 
<!-- some title -->
{{ end }}
{{ define "main" }} 
<!-- main content -->
{{ end }}

to use the baseof.html blocks, but if I want to just redefine the title block I would need to copy the entire single.html file into /layouts/_default/single.html losing track of updates of the original theme.

A better approach would be to be able to just set the title block in my site /layouts/_default/single.html and use the rest of the blocks defined in the original themes/customtheme/layouts/_default/single.html.

The way it works now, if I just set the title block in my site single.html, the theme’s single.html isn’t read.

This way it could be possible to define placeholders in themes like:

{{ block "before_content" . }}{{end}}
...
{{ block "after_content" . }}{{end}}

and make it easier to extend each theme specific part without losing track of their future updates and favour contribution to them.

You can do this with partials. Just create some empty placeholders in theme:

You are right, didn’t thought about partials for that, thanks for the hint.