Hi, I have set up author profile pages using term list templates and author taxonomy.
I cannot get the JSON from my site-schema.html partial to render on an author profile page.
The schema will output on every other pages I have tried.
Eventually, to help debug, I tried to target the specific author page (did not work) and even put some JSON on the term list template itself (did work).
I must be missing something about taxonomy term templates!
Environment:
$ hugo env
hugo v0.121.2-6d5b44305eaa9d0a157946492a6f319da38de154+extended windows/amd64 BuildDate=2024-01-05T12:21:15Z VendorInfo=gohugoio
GOOS=“windows”
GOARCH=“amd64”
GOVERSION=“go1.21.5”
github. com / sass/libsass=“3.6.5”
github. com / webmproject/libwebp=“v1.3.2”
Great catch, thanks. It’s in the part that is working, but I corrected it to find out if it had other effects. Issue still present after correcting this at line 151 of site-schema.html.
I’m pretty sure there is something wrong with my if else statements in site-schema.html. Still working on it!
OK, so I created a new schema partial just for the Profile pages layouts/partials/profilePage-schema.html and called this from head.html partial so basically this logic works {{ if eq .Type “authors” }}.
Once I put the entire contents back into the site-schema.html partial and commented out the new profilePage-schema.html, then it stopped working again.
So I guess there is some issue with my {{if else}} statements in the site-schema.html page. I would appreciate if someone has the time to have a quick look at that. Otherwise I do have this workaround
I’m trying to use variables everywhere to make it easier to use the same template over and over with a few sites i’m moving off Wordpress and Drupal. Hopefully I will only be doing the heavy lifting once (famous last words, as we say in UK