Add sharing metadata

This commit is contained in:
Campbell Alden 2022-08-23 22:14:38 +09:00
parent 6b460faee0
commit 0a798e9db5
4 changed files with 29 additions and 1 deletions

View file

@ -1 +1,5 @@
This site is under construction but will eventually host my movie comments and reviews! ---
title: "CaAlden: Films"
description: A blog about movies and my opinions of them
---
This site is under construction. Please excuse the mess.

View file

@ -1,6 +1,7 @@
--- ---
title: "About" title: "About"
date: 2022-08-21:08:30+09:00 date: 2022-08-21:08:30+09:00
description: A quick burb about why I made this blog
--- ---
This is a blog that I've wanted to start for a long time! I create it with two goals in This is a blog that I've wanted to start for a long time! I create it with two goals in
mind. mind.

View file

@ -1,5 +1,6 @@
<head> <head>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
{{ partial "top_level_sharing.html" . }}
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎥</text></svg>"> <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎥</text></svg>">
<link rel="stylesheet" href="/film/style.css"> <link rel="stylesheet" href="/film/style.css">

View file

@ -0,0 +1,22 @@
<meta property="og:title" content="{{ .Title }}" />
{{ if eq .Section "reviews" }}
<meta property="og:type" content="article" />
<meta property="og:description" content={{.Summary}}>
{{ else }}
{{ if .Params.description }}
<meta property="og:description" content="{{.Params.description}}">
{{ end }}
<meta property="og:type" content="website" />
{{ end }}
<meta property="og:url" content="{{ .Permalink }}" />
{{ if .Params.image }}
<meta property="og:image" content="{{.Params.image}}" />
<meta property="twitter:card" content="summary">
{{end}}
{{ if eq .Section "reviews" }}
<meta property="og:image:alt" content="Movie Poster for {{ .Title }}">
<meta property="og:article:author" content="Campbell Alden">
<meta property="og:article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">
<meta property="twitter:label1" content="Rating">
<meta property="twitter:data1" content="{{.Params.rating}}/5">
{{end}}