Skip to content

Commit

Permalink
tpl/tplimpl: Improve locale value in opengraph.html
Browse files Browse the repository at this point in the history
Closes #12480
  • Loading branch information
jmooring authored and bep committed May 14, 2024
1 parent ee26e69 commit 87ab7f7
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 87ab7f7

Please sign in to comment.