hugo-theme-mofo

Minimal theme for Hugo
git clone https://git.bracken.jp/hugo-theme-mofo.git
Log | Files | Refs | LICENSE

commit 480fcac8eebde748404231359f3060e2f55c4d42
parent a8305a7baeb11a017a6df56c0ec338684c069956
Author: Chris Bracken <chris@bracken.jp>
Date:   Thu, 12 Nov 2020 13:53:13 -0800

Use relative permalinks on index/list page

This makes it possible to host on a separate domain/subdomain for
testing during development.

Diffstat:
Mlayouts/_default/list.html | 2+-
Mlayouts/index.html | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/layouts/_default/list.html b/layouts/_default/list.html @@ -5,7 +5,7 @@ {{- range .Pages }} <li> {{- if eq .Type "post" -}}{{ dateFormat "2006-01-02" .Date }}: {{ end -}} -<a href="{{ .Permalink }}">{{ .Title }}</a> +<a href="{{ .RelPermalink }}">{{ .Title }}</a> {{- end }} </ol> </section> diff --git a/layouts/index.html b/layouts/index.html @@ -2,7 +2,7 @@ <section id="posts"> <ol class="post-list"> {{- range where .Site.RegularPages "Type" "post" }} -<li>{{ dateFormat "2006-01-02" .Date }}: <a href="{{ .Permalink }}">{{ .Title }}</a> +<li>{{ dateFormat "2006-01-02" .Date }}: <a href="{{ .RelPermalink }}">{{ .Title }}</a> {{- end }} </ol> </section>