Hi all!
For several large projects I am switching from Middleman to Hugo and everything runs smoothly and very quickly. Thanks a lot for Hugo!
Just one more thing needs to work: How can I make a partial a variable and check whether it contains anything. Here the rough code:
{{ $myPartial := partial "mypartial.html" . }}
{{ if ($myPartial) and ($myPartial "!=" "") }}
<div class="myclass">
{{ $myPartial }}
</div>
{{ end }}
As mypartial.html
contains if queries, ranges and such, it may contain empty spaces and line breaks.
Thanks a lot!