The parser could find block so unexpected <define> was fired?

Error: add site dependencies: load resources: loading templates: failed to parse “_default/list.json”:: template: _default/baseof.json:18: unexpected in command

I can pretty sure that I’ve declare the block “footer” and define it to use the compile keeps throwing that error. Why is that?

You should not use DEFINE multiple times in one file.

the define main should be the outer edge, move the two other "define"s inside main and change it to

{{ define main }}
{{ partial header . }} 
{{ partial footer . }}

define is a way for us to fill the the block (placeholder) with a custom code. So we can use as many define as block declared in baseof.html. I don’t believe that is the cause of the error.

Btw, your sample code has a wrong syntax: {{ define main }} -> {{ define "main" }}

I couldn’t find anything about it in the docs. In all examples I have seen only one DEFINE per file.

Eyeballing: are you missing an end on your paginator statement?

1 Like

My illness embarrassed me :’(

@ju52 it is a built-in statement of Go template, not Hugo functions.

must dive deeper in golang :wink:

Don’t forget to bring a couple of oxygen tanks with you.