Eric Bower
·
03 Sep 24
blog.page.tmpl
1{{template "base" .}}
2
3{{define "title"}}{{.PageTitle}}{{end}}
4
5{{define "meta"}}
6{{if .Header.Favicon}}
7<link rel="icon" href="{{.Header.Favicon}}">
8{{else}}
9<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
10{{end}}
11
12<meta name="description" content="{{if .Header.Bio}}{{.Header.Bio}}{{else}}{{.Header.Title}}{{end}}" />
13
14<meta property="og:type" content="website">
15<meta property="og:site_name" content="{{.Site.Domain}}">
16<meta property="og:url" content="{{.URL}}">
17<meta property="og:title" content="{{.Header.Title}}">
18{{if .Header.Bio}}<meta property="og:description" content="{{.Header.Bio}}">{{end}}
19
20{{if .Header.Image}}
21<meta itemprop="image" content="{{.Header.Image}}" />
22<meta property="og:image" content="{{.Header.Image}}" />
23
24<meta name="twitter:image" content="{{.Header.Image}}" />
25{{else}}
26<meta property="og:image:width" content="300" />
27<meta property="og:image:height" content="300" />
28<meta itemprop="image" content="https://{{.Site.Domain}}/card.png" />
29<meta property="og:image" content="https://{{.Site.Domain}}/card.png" />
30
31<meta name="twitter:image" content="https://{{.Site.Domain}}/card.png" />
32{{end}}
33
34{{if .Header.ImageCard}}
35<meta property="twitter:card" content="{{.Header.ImageCard}}">
36{{else}}
37<meta property="twitter:card" content="summary">
38{{end}}
39<meta property="twitter:url" content="{{.URL}}">
40<meta property="twitter:title" content="{{.Header.Title}}">
41{{if .Header.Bio}}<meta property="twitter:description" content="{{.Header.Bio}}">{{end}}
42
43<link rel="alternate" href="{{.RSSURL}}" type="application/rss+xml" title="RSS feed for {{.Header.Title}}" />
44{{if .WithStyles}}
45 <link rel="stylesheet" href="/smol.css" />
46{{else}}
47{{end}}
48<link rel="stylesheet" href="/syntax.css" />
49{{if .HasCSS}}<link rel="stylesheet" href="{{.CssURL}}" />{{end}}
50{{end}}
51
52{{define "attrs"}}id="blog" class="layout-{{.Header.Layout}}"{{end}}
53
54{{define "body"}}
55
56{{if eq .Header.Layout "aside"}}
57 {{template "blog-aside" .}}
58{{else}}
59 {{template "blog-default" .}}
60{{end}}
61
62{{template "footer" .}}
63{{end}}