fixing links after new hugo !publish!...

This commit is contained in:
Marcell Mars 2020-03-16 12:08:41 +01:00
parent d734c12928
commit 10e6ec1125
2 changed files with 32 additions and 29 deletions

View File

@ -16,24 +16,24 @@
{{ if $.Page.Site.GetPage $s_destination }} {{ if $.Page.Site.GetPage $s_destination }}
{{ $session := $.Page.Site.GetPage $s_destination }} {{ $session := $.Page.Site.GetPage $s_destination }}
{{ if not $text_link }} {{ if not $text_link }}
<a href="/session/{{ $s_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with $session.Title}} title="{{ $session.Title }}"{{ end }}>{{ $session.Title }}</a> <a href="{{ $s_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with $session.Title}} title="{{ $session.Title }}"{{ end }}>{{ $session.Title }}</a>
{{ else }} {{ else }}
<a href="/session/{{ $s_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ $text_link }}</a> <a href="{{ $s_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ $text_link }}</a>
{{ end }} {{ end }}
{{ else }} {{ else }}
<a href="/session/{{ $s_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">session:{{ $s_destination }} not found</span></a> <a href="{{ $s_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">session:{{ $s_destination }} not found</span></a>
{{ end }} {{ end }}
{{ else if strings.HasPrefix .Destination "topic:" }} {{ else if strings.HasPrefix .Destination "topic:" }}
{{ $t_destination := printf "/topic/%s" (substr .Destination 6) }} {{ $t_destination := printf "/topic/%s" (substr .Destination 6) }}
{{ if $.Page.Site.GetPage $t_destination }} {{ if $.Page.Site.GetPage $t_destination }}
{{ $topic := $.Page.Site.GetPage $t_destination }} {{ $topic := $.Page.Site.GetPage $t_destination }}
{{ if not $text_link }} {{ if not $text_link }}
<a href="/topic/{{ $t_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with $topic.Title}} title="{{ $topic.Title }}"{{ end }}>{{ $topic.Title }}</a> <a href="{{ $t_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with $topic.Title}} title="{{ $topic.Title }}"{{ end }}>{{ $topic.Title }}</a>
{{ else }} {{ else }}
<a href="/topic/{{ $t_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ $text_link }}</a> <a href="{{ $t_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ $text_link }}</a>
{{ end }} {{ end }}
{{ else }} {{ else }}
<a href="/topic/{{ $t_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">topic:{{ $t_destination }} not found</span></a> <a href="{{ $t_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">topic:{{ $t_destination }} not found</span></a>
{{ end }} {{ end }}
{{ else if findRE "^.*static" .Destination }} {{ else if findRE "^.*static" .Destination }}
<img src="{{ (replaceRE "^.*static" "" .Destination ) | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} /> <img src="{{ (replaceRE "^.*static" "" .Destination ) | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />

View File

@ -1,25 +1,28 @@
<title>{{ block "title" . }} <head>
{{- .Title }} - {{ .Site.Title -}} <meta charset="utf-8" />
{{ end }}</title> <meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon.png"> {{ if .Description }}
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> <meta name="description" content="{{ .Description }}" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> {{ end }}
<link rel="manifest" href="/site.webmanifest"> {{ if .Keywords }}
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"> <meta name="keywords" content="{{ delimit .Keywords "," }}" />
<meta name="msapplication-TileColor" content="#da532c"> {{ end }}
<meta name="theme-color" content="#ffffff"> {{ if .Params.Author }}
<meta name="author" content="{{ .Params.Author}}" />
{{ end }}
<meta charset="utf-8" /> {{ template "_internal/opengraph.html" . }}
{{ if .Description }} {{ template "_internal/twitter_cards.html" . }}
<meta name="description" content="{{ .Description }}" />
{{ end }} {{ hugo.Generator }}
{{ if .Keywords }}
<meta name="keywords" content="{{ delimit .Keywords "," }}" /> <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon.png">
{{ end }} <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
{{ if .Params.Author }} <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<meta name="author" content="{{ .Params.Author}}" /> <link rel="manifest" href="/site.webmanifest">
{{ end }} <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#996561">
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }} <title>{{ block "title" . }}{{- .Title }} - {{ .Site.Title -}}{{ end }}</title>
{{ hugo.Generator }} </head>