repos
/ orchard main

orchard

mirror

Every 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.4 KB · 34 lines · HTML Raw History
 1{{define "content"}}
 2{{$d := .Data}}{{$c := $d.Ctx}}
 3{{template "repohead" (dict "Ctx" $c "Tab" "files")}}
 4
 5<div class="toolbar">
 6  {{/*
 7    The leaf is the file itself and is rendered as text, not a link. Linking it
 8    to a /tree/ URL, as every other crumb correctly is, produced a 404 on the
 9    last crumb of every blob page.
10  */}}
11  <nav class="crumbs">
12    <a href="/{{$c.Repo.Name}}/tree/{{$c.Rev}}">{{$c.Repo.Name}}</a>
13    {{$segs := pathSegs $d.Path}}{{$last := sub (len $segs) 1}}
14    {{range $i, $seg := $segs}} /
15      {{if eq $i $last}}<span class="leaf">{{$seg.Name}}</span>
16      {{else}}<a href="/{{$c.Repo.Name}}/tree/{{$c.Rev}}/{{urlPath $seg.Path}}">{{$seg.Name}}</a>{{end}}
17    {{end}}
18  </nav>
19  <span class="stat">{{humanBytes $d.Size}}{{if $d.Lines}} &middot; {{$d.Lines}} lines{{end}}{{if $d.Language}} &middot; {{$d.Language}}{{end}}</span>
20  <a class="btn" href="/{{$c.Repo.Name}}/raw/{{$c.Rev}}/{{urlPath $d.Path}}">Raw</a>
21  <a class="btn" href="/{{$c.Repo.Name}}/log/{{$c.Rev}}/{{urlPath $d.Path}}">History</a>
22</div>
23
24{{if $d.TooLarge}}
25  <p class="notice">This file is {{humanBytes $d.Size}}, too large to render. Download the raw file instead.</p>
26{{else if $d.Binary}}
27  <p class="notice">Binary file, {{humanBytes $d.Size}}. Download the raw file to inspect it.</p>
28{{else if $d.Highlighted}}
29  <div class="code">{{$d.Highlighted}}</div>
30{{else}}
31  <pre class="code plain">{{$d.Plain}}</pre>
32{{end}}
33{{end}}