Skip to content

Commit

Permalink
ogp: fix bug of invalid generated image URL
Browse files Browse the repository at this point in the history
Signed-off-by: smallkirby <ssmallkirby@gmail.com>
  • Loading branch information
smallkirby committed Aug 20, 2023
1 parent f26e00b commit 2f92417
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/head/seo/opengraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<meta property="og:image:alt" content="{{ . }}" />
{{ end }}
{{ else if $.Params.images }}
<meta property="og:image" content="{{ path.Join $.Permalink (index $.Params.images 0) | absURL }}"/>
<meta property="og:image" content="{{ printf "%s%s" $.Permalink (index $.Params.images 0) | absURL }}"/>
{{ else if $.Site.Params.images }}
<meta property="og:image" content="{{ index $.Site.Params.images 0 | absURL }}"/>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/head/seo/twitter-cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{{ end }}
{{ else if $.Params.images }}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ path.Join $.Permalink (index $.Params.images 0) | absURL }}"/>
<meta name="twitter:image" content="{{ printf "%s%s" $.Permalink (index $.Params.images 0) | absURL }}"/>
{{ else if $.Site.Params.images }}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ index $.Site.Params.images 0 | absURL }}"/>
Expand Down

0 comments on commit 2f92417

Please sign in to comment.