alanorth / hugo-theme-bootstrap4-blog

A blogging-centric Bootstrap v4 theme for the Hugo static site generator.
Other
204 stars 132 forks source link

syntax error in structured data #112

Closed fte378 closed 5 years ago

fte378 commented 5 years ago

After updating to 1.3.2 I get warnings from the Google search console about problems in my structured data.

The test tool says: JSON-L "," oder "}" fehlt in der Objektbeschreibung.

("," or "}” missing in object description

The change from TommySprat seems to not change the escaping of the + character: "wordCount": "1102", "datePublished": 2018-10-20T17:15:49+01:00, "dateModified": 2018-10-20T17:15:49+01:00, "author": { "@type": "Person", I use the latest Hugo version (v0.55.6).

alanorth commented 5 years ago

Hey, @fte378. That's strange because the change is definitely working for me. Is your site's code open source so I can try to replicate the error?

fte378 commented 5 years ago

I opened it for everyone (can‘t do much right now - I‘m on the road): https://bitbucket.org/ftegtmeyer/frank.tegtmeyer.net/

alanorth commented 5 years ago

Thanks, @fte378. Yes you're right: the fix doesn't work on your blog for some reason. I guess it's good news that it's also broken in version 1.3.1 as well...

"dateModified": "2019-05-28T18:01:49\x2b02:00",

Not sure what would cause this... I'll look into it in a bit.

alanorth commented 5 years ago

Hey, @fte378. You have overridden the single and list layout templates in your site's layouts/_default and they are using the old style dateModified:

"dateModified": {{ .Lastmod.Format $ISO8601 }},
fte378 commented 5 years ago

You are right. And I was sure that I diffed every template and double checked it afterwards. Sorry for wasting your time.