tpl/tplimpl: Improve locale value in opengraph.html

Closes #12480
This commit is contained in:
Joe Mooring 2024-05-10 15:25:20 -07:00 committed by Bjørn Erik Pedersen
parent ee26e69ce3
commit 87ab7f7ffc
2 changed files with 3 additions and 3 deletions

View file

@ -12,8 +12,8 @@
<meta property="og:description" content="{{ . }}"> <meta property="og:description" content="{{ . }}">
{{- end }} {{- end }}
{{- with or .Params.locale site.Language.LanguageCode site.Language.Lang }} {{- with or .Params.locale site.Language.LanguageCode }}
<meta property="og:locale" content="{{ . }}"> <meta property="og:locale" content="{{ replace . `-` `_` }}">
{{- end }} {{- end }}
{{- if .IsPage }} {{- if .IsPage }}

View file

@ -372,7 +372,7 @@ series: [series-1]
<meta property="og:url" content="/s1/p1/"> <meta property="og:url" content="/s1/p1/">
<meta property="og:title" content="p1"> <meta property="og:title" content="p1">
<meta property="og:description" content="a b and c cant."> <meta property="og:description" content="a b and c cant.">
<meta property="og:locale" content="en-US"> <meta property="og:locale" content="en_US">
<meta property="og:type" content="article"> <meta property="og:type" content="article">
<meta property="article:section" content="s1"> <meta property="article:section" content="s1">
<meta property="article:published_time" content="2024-04-24T08:00:00-07:00"> <meta property="article:published_time" content="2024-04-24T08:00:00-07:00">