Component Content Wrappers for Layouts

As a theme author I find I am missing a component workflow with HTML. Below is an example of how I think I might like to work to create reusable components to be used within layout.html files. Is there already some Hugo way to achieve this? Thanks!

<!-- layouts/single.html -->
{{ with partialComponent "my-wrapper.html" . }}
  <h1>{{ .Title }}</h1>
  {{ .Content }}
{{ end }


<!-- partials/components/my-wrapper.html -->
<div class="">
  <div class="">
    {{ component.Slot }}

Not that I can think of.

1 Like