zeon-studio / hugoplate

Hugoplate is a free starter template built with Hugo and TailwindCSS that will save you hours of work.
https://zeon.studio/preview?project=hugoplate
MIT License
798 stars 218 forks source link

Custom partials not rendering #98

Closed AndreasHnida closed 7 months ago

AndreasHnida commented 7 months ago

What is your Hugo Extended Version

hugo v0.122.0+extended

What is your Go Version

go1.21.6

What is your Node.js Version

v21.6.1

Check for Existing Issues

Expected Behavior

when I create a simple partial by

{{ define "testPartial" }}
<p>Test-Partial</p>
{{ end }}

in the themes/hugoplate/layouts/partials folder, and call it from within index.thml it get's found (e.g. no error is thrown) but it does not render anything. theme partials are working correctly, own partials not. whats the catch here?

I restarted the dev server several times.

Steps to Reproduce

  1. create new partial in partials directory
  2. call partial from index.thml
  3. reload page

Code Reproduction URL

No response

Additional Information

No response

AndreasHnida commented 7 months ago

Ok, so it turns out, partials get defined WITHOUT {{ define ... }}} omfg.

I used GH Copilot to explain to me how to use partials. so I was pretty sure, that it would have created it in the right way. it gave me even the testPartial script. Oh man.