single: add opengraph tags, closes #1
ci/woodpecker/push/woodpecker Pipeline was successful Details

main
Ariadne Conill 2022-08-11 08:50:55 +00:00
parent 5aabd4606e
commit 0ceee8ebd5
2 changed files with 16 additions and 0 deletions

View File

@ -10,6 +10,8 @@
<link rel="alternate" type="application/rss+xml" href="/index.xml">
<link rel="alternate" type="application/atom+xml" href="/atom.xml">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ block "opengraph" . }}
{{ end }}
</head>
<body>
<nav id="sidebar">

View File

@ -18,3 +18,17 @@
{{ define "title" }}
{{ .Title }} | {{ .Site.Title }}
{{ end }}
{{ define "opengraph" }}
<!-- Opengraph tags -->
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:title" content="{{ .Title }}">
{{ if .Date }}
<meta property="og:type" content="article">
{{ end }}
<meta property="og:description" content="{{ .Summary }}">
<!-- Twitter tags -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@ariadneconill">
{{ end }}