Skip to content
/ hugo Public
forked from gohugoio/hugo

Commit

Permalink
tpl/tplimpl: Improve locale value in opengraph.html
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed May 10, 2024
1 parent ee26e69 commit 9b42c2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tpl/tplimpl/embedded/templates/opengraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<meta property="og:description" content="{{ . }}">
{{- end }}

{{- with or .Params.locale site.Language.LanguageCode site.Language.Lang }}
<meta property="og:locale" content="{{ . }}">
{{- with or .Params.locale site.Language.LanguageCode }}
<meta property="og:locale" content="{{ replace . `-` `_` }}">
{{- end }}

{{- if .IsPage }}
Expand Down
2 changes: 1 addition & 1 deletion tpl/tplimpl/tplimpl_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ series: [series-1]
<meta property="og:url" content="/s1/p1/">
<meta property="og:title" content="p1">
<meta property="og:description" content="a b and c can’t.">
<meta property="og:locale" content="en-US">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="article">
<meta property="article:section" content="s1">
<meta property="article:published_time" content="2024-04-24T08:00:00-07:00">
Expand Down

0 comments on commit 9b42c2c

Please sign in to comment.