repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

pico / pastes / html
Eric Bower · 03 Oct 24

blog.page.tmpl

 1{{template "base" .}}
 2
 3{{define "title"}}{{.PageTitle}}{{end}}
 4
 5{{define "meta"}}
 6<meta name="description" content="{{if .Header.Bio}}{{.Header.Bio}}{{else}}{{.Header.Title}}{{end}}" />
 7
 8<meta property="og:type" content="website">
 9<meta property="og:site_name" content="{{.Site.Domain}}">
10<meta property="og:url" content="{{.URL}}">
11<meta property="og:title" content="{{.Header.Title}}">
12{{if .Header.Bio}}<meta property="og:description" content="{{.Header.Bio}}">{{end}}
13<meta property="og:image:width" content="300" />
14<meta property="og:image:height" content="300" />
15<meta itemprop="image" content="https://{{.Site.Domain}}/card.png" />
16<meta property="og:image" content="https://{{.Site.Domain}}/card.png" />
17
18<meta property="twitter:card" content="summary">
19<meta property="twitter:url" content="{{.URL}}">
20<meta property="twitter:title" content="{{.Header.Title}}">
21{{if .Header.Bio}}<meta property="twitter:description" content="{{.Header.Bio}}">{{end}}
22<meta name="twitter:image" content="https://{{.Site.Domain}}/card.png" />
23<meta name="twitter:image:src" content="https://{{.Site.Domain}}/card.png" />
24{{end}}
25
26{{define "attrs"}}{{end}}
27
28{{define "body"}}
29<header class="text-center">
30    <h1 class="text-2xl">{{.Header.Title}}</h1>
31    <hr class="my-2" />
32</header>
33<main>
34    <section class="posts">
35        {{range .Posts}}
36        <article class="my">
37            <div class="flex items-center">
38                <time datetime="{{.PublishAtISO}}" class="font-italic text-sm post-date">{{.PublishAt}}</time>
39                <div class="text-md flex-1 transform-none m-0"><a href="{{.URL}}">{{.Title}}</a></div>
40            </div>
41        </article>
42        {{end}}
43    </section>
44</main>
45{{template "footer" .}}
46{{end}}