Og:site_name is not generated using template "_internal/opengraph.html"


Using {{ template "_internal/opengraph.html" . }} cannot generate og:site_name, even I have .title params in my config.toml

Based on the source code of template on Github https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates.autogen.go,
{{- with .Site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }}
it should be generate the metatag site_name if I have title.

this is my config.toml:

title = "Sky Lee | Developer, Freelancer, Blogger"

    title = "Sky Lee | Developer, Freelancer, Blogger"

The first place to check would be your site’s code, please share it.


Hi @maik,

Which site code you are referring to? I shared my config.toml code.


How do you suggest I proceed? I have your config.toml. To test it, what shall I do? I suppose I could build a test site, so I’ll spin up a new Hugo site, generate some templates to drop your one line of code, and then generate some fake content to ensure it works with content.

But then if that works, it doesn’t help you, because we don’t know how your templates interact. And I am not going to do that, because I don’t build temp to debug issues that can be solved by cloning or looking at the actual code in question; it is not a good use of my time.

Please advise on how I can debug your site, or follow the suggestions at Requesting Help and share your site’s code. If you are unable, build a test site that reproduces your issue, and share that.

1 Like