themes: add auto title on blog posts

blog-move
Jae Lo Presti 2 months ago
parent aa17c3223f
commit 993eb5106c
Signed by: jae
SSH Key Fingerprint: SHA256:hmKix/+XG+9GEGHgDdiqXfmB2O7BU4CPVOoQoIYIQ2Y
  1. 49
      themes/maintheme/layouts/blog/single.html

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic page meta -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
{{ block "title" . }} {{ .Site.Title }} {{ if .Page }}| {{ .Page.Title }} {{ end }} {{ end }}
</title>
<!-- Style -->
<link rel="stylesheet" type="text/css" href="/main.css">
<link rel="icon" href="/logo.svg" type="image/svg+xml" sizes="any">
<!-- OpenGraph -->
<meta property="og:locale" content="en_GB">
<meta property="og:title" content="Jae's Website">
<meta property="og:url" content="https://jae.fi">
<meta property="og:site_name" content="Jae's Website">
<meta property="og:description" content="The website of Jae Lo Presti">
<meta property="og:image" content="https://bm.jae.fi/web/Logo-abs.png">
</head>
<body id="body">
<div class="page">
<div class="header">
<a href="/">
<h1>
<span class="title">{{ .Site.Title }}</span><br/>
<span class="subtitle">Random Beeps'n Boops</span>
</h1>
</a>
<!-- TEMPORARY -->
<img src="/logo.svg" alt="Logo" />
</div>
<div class="cpage">
<div class="mainPage">
<h1>{{ .Title }}</h1>
<small>Estimated reading time: {{ math.Round (div (countwords .Content) 220.0) }} minute(s)</small>
{{ .Content }}
</div>
{{ partial "navigation.html" . }}
</div>
</div>
</body>
</html>