~ashie/blog

a446c0d6ddeae7e23deb86c4fa15a8daafc09ddb — Ash 22 days ago 5875c28
feat: add social media meta tags
1 files changed, 17 insertions(+), 1 deletions(-)

M layouts/partials/head.html
M layouts/partials/head.html => layouts/partials/head.html +17 -1
@@ 1,11 1,27 @@
<head>
    <title>{{ .Title }}</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="robots" content="noai, noimageai" />

    <title>{{ .Title }}</title>

    <meta name="og:title" content="{{ .Title }}">
    <meta name="og:url" content="{{ .Permalink }}">
    <meta name="og:image" content="{{ .Site.BaseURL }}/avatar.png">
    <meta 
        name="og:type"
        content="{{ if eq .Type "blog" }}article{{ else }}website{{ end }}"
    >

    <meta name="twitter:title" content="{{ .Title }}">
    <meta name="twitter:url" content="{{ .Permalink }}">
    <meta name="twitter:image" content="{{ .Site.BaseURL }}/avatar.png">
    <meta name="twitter:card" content="summary">

    {{ with .Description }}
        <meta name="description" content="{{ . }}" />
        <meta name="og:description" content="{{ . }}" />
        <meta name="twitter:description" content="{{ . }}" />
    {{ end }}

    <link rel="shortcut icon" href="/favicon-96x96.png" type="image/png" />