orchard
mirrorEvery site I host, in one repo, along with the Cloudflare Tunnel and Caddy that front them. It's all Go, Vite, and SQLite, and it runs on a desktop at home with nothing listening on an inbound port.
blogbuncaddycloudflare-tunneldockergogolanghomelabhtml-templatemonorepoself-hostedseosqlitestatic-sitetypstuptime-monitoringviteweb-analytics
1{{ define "content" }}
2<div class="container mt-5">
3 <div class="row">
4 <div class="col-sm-6">
5 <h1 class="mb-3 fw-bolder">
6 {{- if .Kicker }}
7 <div class="section-label fs-6 mb-1">{{ .Kicker }}</div>
8 {{- end }}
9 {{ .Heading }}
10 </h1>
11 </div>
12 <div class="col-sm-6">
13 {{- template "search_form" .Query }}
14 </div>
15 </div>
16</div>
17
18<div class="container mt-3">
19 <div class="d-flex flex-wrap align-items-center gap-2">
20 <span class="filter-label">tags</span>
21 {{- range .Tags }}
22 <a href="{{ .URL }}" class="btn btn-sm rounded-pill {{ if eq .Name $.ActiveTag }}btn-filter-active{{ else }}btn-filter{{ end }}">{{ .Display }}</a>
23 {{- end }}
24 <span class="filter-divider"></span>
25 <span class="filter-label">year</span>
26 {{- range .Years }}
27 <a href="/blog/year/{{ . }}/" class="btn btn-sm rounded-pill {{ if eq . $.ActiveYear }}btn-filter-active{{ else }}btn-filter{{ end }}">{{ . }}</a>
28 {{- end }}
29 {{- if or .ActiveTag .ActiveYear }}
30 <span class="filter-divider"></span>
31 <a href="/blog/" class="btn btn-sm rounded-pill btn-filter-clear">clear</a>
32 {{- end }}
33 </div>
34</div>
35
36{{- if .Posts }}
37{{- template "post_latest" index .Posts 0 }}
38{{- end }}
39
40<div class="container mt-5">
41 <div class="row">
42 {{- range $i, $post := .Posts }}
43 {{- if $i }}
44 <div class="col-sm-12 col-md-6 col-lg-4 mb-5">
45 {{- template "post_card" $post }}
46 </div>
47 {{- end }}
48 {{- end }}
49 </div>
50
51 {{- if .ExtraPosts }}
52 <div class="row mb-3">
53 <div class="col">
54 {{- template "alert" dict "Kind" "info" "Message" "I don't have any more posts with this filter at the moment but here are some other posts you might like!" }}
55 </div>
56 </div>
57 <div class="row">
58 {{- range .ExtraPosts }}
59 <div class="col-12 col-md-6 col-lg-4 mb-5">
60 {{- template "post_card" . }}
61 </div>
62 {{- end }}
63 </div>
64 {{- end }}
65</div>
66{{ end }}