diff --git a/archetypes/default.md b/archetypes/default.md deleted file mode 100644 index c6f3fce..0000000 --- a/archetypes/default.md +++ /dev/null @@ -1,5 +0,0 @@ -+++ -title = '{{ replace .File.ContentBaseName "-" " " | title }}' -date = {{ .Date }} -draft = true -+++ diff --git a/hugo.yaml b/hugo.yaml index 074aa06..f451d31 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -1,9 +1,7 @@ -baseurl: "https://torbjorn.no/" # please update this to your actual URL +baseurl: "https://torbjorn.no/" languageCode: "en-us" title: "Torbjørn Bakken Pedersen's home page" -theme: "xmin" -#disqusShortname: "" -ignoreFiles: ["\\.Rmd$", "\\.Rmarkdown$", "_cache$"] +ignoreFiles: ["_cache$"] footnotereturnlinkcontents: "↩" date-format: 2006-01-02 buildDrafts: false @@ -38,6 +36,7 @@ menu: weight: 3 - name: RSS url: "index.xml" + weight: 4 params: description: "Torbjørn Bakken Pedersen's personal web page" diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..807d963 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,6 @@ +{{ partial "header.html" . }} + +

404 NOT FOUND

+

The page you requested does not exist.

+ +{{ partial "footer.html" . }} \ No newline at end of file diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 91a8ee7..ab0bdbe 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -10,7 +10,7 @@ {{- $caption := .Title -}} {{- $src := .Destination -}} {{- $imgBd5 := md5 $src -}} -{{- $dataSzes := "800px" -}} +{{- $dataSzes := "(max-width: 320px) 320px, (max-width: 640px) 640px, 800px" -}} {{- $holder := "GIP" -}} {{- $hint := "photo" -}} {{- $filter := "box" -}} @@ -33,7 +33,7 @@ {{- if lt $imgRsc.Width 800 -}} {{- $imgRsc.RelPermalink }} {{ $imgRsc.Width }}w {{- else -}} - {{- (cond (gt $imgRsc.Width .) ($imgRsc.Process (print "resize " . "x webp " $hint " " $filter)) $imgRsc).RelPermalink }} {{ . }}w + {{- (cond (gt $imgRsc.Width .) ($imgRsc.Process (print "resize " . "x webp q85 " $hint " " $filter)) $imgRsc).RelPermalink }} {{ . }}w {{- end -}} {{- end -}} {{- end -}} @@ -55,34 +55,16 @@ alt="{{ $alt }}" title="{{ $alt }}" loading="lazy" - fetchpriority="high" + fetchpriority="auto" data-pagefind-ignore /> {{- end -}} {{- else -}} - +
+

Image unavailable: "{{ $src }}" could not be found. Check the file path or name.

+
{{- end -}} {{- with $caption -}}

{{ $caption | $.Page.RenderString }}

{{- end }} - \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e1b97bd..99d347a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -11,13 +11,9 @@

{{ .Title | markdownify }}

{{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }} {{ range (where $pages "Section" "!=" "") }}
- {{ .Date.Format "2006-01-02" }} - - {{ .Title | markdownify }} + {{ .Date.Format "2006-01-02" }} -{{ .Title | markdownify }}
{{ end }} -{{- if .Site.Params.goatcounter }} - {{ partial "analytics.html" . -}} -{{- end}} {{ partial "footer.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index beeb372..0ceedc4 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -13,9 +13,6 @@

{{ .Title | markdownify }}

{{ .Content }}
-{{- if .Site.Params.goatcounter }} - {{ partial "analytics.html" . -}} -{{- end}} {{ partial "footer.html" . }} diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html index 9585a57..5598f1a 100644 --- a/layouts/partials/analytics.html +++ b/layouts/partials/analytics.html @@ -1,3 +1,10 @@ - + diff --git a/layouts/partials/clown.html b/layouts/partials/clown.html index 8403d12..5a0f2e0 100644 --- a/layouts/partials/clown.html +++ b/layouts/partials/clown.html @@ -4,8 +4,9 @@ - \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..b095312 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,12 @@ + + + {{- if .Site.Params.goatcounter }} + {{ partial "analytics.html" . -}} + {{- end}} + + \ No newline at end of file diff --git a/layouts/partials/head_custom.html b/layouts/partials/head_custom.html new file mode 100644 index 0000000..9a2b918 --- /dev/null +++ b/layouts/partials/head_custom.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 3e36860..39eb891 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -6,6 +6,38 @@ {{ .Title }} | {{ .Site.Title }} + + + + + + + + + + @@ -20,9 +52,14 @@ - - - + + + + + {{ partial "head_custom.html" . }} @@ -33,9 +70,9 @@ {{ end }} -
{{ partial "clown.html" . }}
+
{{ partial "clown.html" . }}