alanorth / hugo-theme-bootstrap4-blog

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

publisher missing in structured data #113

Closed fte378 closed 4 years ago

fte378 commented 5 years ago

The testtool for structured data mentions that publisher is a required property but the blog doesn't generate it.

Here is the relevant code

{{- with .Site.Social.GooglePlus }} "publisher": "{{ printf "%s" . }}", {{- end }} "author": { "@type": "Person", "name": "{{ .Params.author | default .Site.Params.author }}" } Maybe this should use another source for publisher.

alanorth commented 5 years ago

Ah yes, you are right. That used to come from GooglePlus. Anyways, we need to consult the schema.org documentation for Blog and BlogPosting, used on the homepage and individual posts, respectively. As far as I can tell this should not be a string like "Alan Orth". It looks like it needs to be a JSON object with quite a few attributes.

alanorth commented 4 years ago

Coming back to this. Schema.org says this can be an "Organization" or a "Person". We could easily use the author's name:

  "publisher": {
    "@type": "Person",
    "name": "Alan Orth"
  },

But Google's structured data testing tool says Person is not a valid type for Publisher. So really I don't care about this right now. We have the author after all. Closing.