feat: add Open Graph and Twitter meta tags

Enhanced social media integration by adding Open Graph and Twitter meta tags to the head section. This improvement facilitates better content sharing by providing structured data for social platforms, which can enhance the appearance and engagement of shared links. This change is particularly beneficial for boosting visibility and interaction on platforms like Facebook and Twitter.
This commit is contained in:
Kumi 2024-11-09 14:07:57 +01:00
parent de05decf0a
commit ebef29ce3d
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -7,4 +7,14 @@
{{ $style := resources.Get "css/style.css" }} {{ $style := resources.Get "css/style.css" }}
{{ $css := $style | minify | fingerprint }} {{ $css := $style | minify | fingerprint }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}"> <link rel="stylesheet" href="{{ $css.RelPermalink }}">
<meta property="og:title" content="{{ .Title }}">
<meta property="og:description" content="{{ .Description }}">
<meta property="og:type" content="article">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:image" content="{{ .Site.BaseURL }}{{ .Params.image }}">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ .Title }}">
<meta name="twitter:description" content="{{ .Description }}">
<meta name="twitter:image" content="{{ .Site.BaseURL }}{{ .Params.image }}">
</head> </head>