Misc. updates & reorganization

This commit is contained in:
David Eisinger
2023-10-24 20:49:29 -04:00
parent 1ed0f8128e
commit bb65a3d80f
14 changed files with 93 additions and 26 deletions

View File

@@ -2,14 +2,20 @@
<section>
<hr>
<h3>Elsewhere</h3>
<h2>Elsewhere</h2>
{{ .Content }}
<ul>
{{ range (where .Site.RegularPages "Type" "in" "elsewhere") }}
{{ $url := urls.Parse .Params.canonical_url }}
{{ $host := strings.Replace $url.Hostname "www." "" }}
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{ .Date | time.Format "(2006-01-02)" }}
{{ if .Params.needs_review }}<b>NEEDS REVIEW</b>{{ end }}
<span class="nowrap">
(<a href="{{ $url }}">{{ $host }}</a>, {{ .Date | time.Format "2006-01-02" }})
</span>
</li>
{{ end }}
</ul>

View File

@@ -1,13 +1,21 @@
{{ define "head" }}
<link rel="canonical" href="{{ .Params.canonical_url }}">
{{ end }}
{{ define "main" }}
{{ $url := urls.Parse .Params.canonical_url }}
{{ $host := strings.Replace $url.Hostname "www." "" }}
<hr>
<h2>{{ .Title }}</h2>
<h2>
<a href="/elsewhere">Elsewhere</a> <span>&gt;</span>
{{ .Title }}
</h2>
<h3>
Posted {{ .Date | time.Format "2006-01-02" }}
on <a href="{{ .Params.canonical_url }}">{{ $url.Hostname }}</a>
on <a href="{{ .Params.canonical_url }}">{{ $host }}</a>
</h3>
{{ .Content }}