diff --git a/themes/piratecare/layouts/_default/_markup/render-image.html b/themes/piratecare/layouts/_default/_markup/render-image.html index 478fd39..fea1987 100644 --- a/themes/piratecare/layouts/_default/_markup/render-image.html +++ b/themes/piratecare/layouts/_default/_markup/render-image.html @@ -12,7 +12,7 @@ {{ $text_link }}⦚bib:{{ $destination }} not found {{ end }} {{ else if strings.HasPrefix .Destination "session:" }} - {{ $s_destination := (substr .Destination 8) }} + {{ $s_destination := printf "/session/%s" (substr .Destination 8) }} {{ if $.Page.Site.GetPage $s_destination }} {{ $session := $.Page.Site.GetPage $s_destination }} {{ if not $text_link }} @@ -24,7 +24,7 @@ {{ $text_link }}⦚session:{{ $s_destination }} not found {{ end }} {{ else if strings.HasPrefix .Destination "topic:" }} - {{ $t_destination := (substr .Destination 6) }} + {{ $t_destination := printf "/topic/%s" (substr .Destination 6) }} {{ if $.Page.Site.GetPage $t_destination }} {{ $topic := $.Page.Site.GetPage $t_destination }} {{ if not $text_link }} diff --git a/themes/piratecare/layouts/session/list.html b/themes/piratecare/layouts/session/list.html index 13dfcac..acd9416 100644 --- a/themes/piratecare/layouts/session/list.html +++ b/themes/piratecare/layouts/session/list.html @@ -1,7 +1,13 @@ {{ define "main" }} - - {{ range .Data.Pages }} -
> {{ .Title }}
+ {{ $relpermalink := "" }} + + {{ range .Data.Pages }} + {{ if .Site.Data.myvars.edit }} + {{ $relpermalink = printf "%s%s" "/_preview" .RelPermalink }} + {{ else }} + {{ $relpermalink = .RelPermalink }} {{ end }} -
+
> {{ .Title }}
+ {{ end }} +
{{ end }} diff --git a/themes/piratecare/layouts/topic/list.html b/themes/piratecare/layouts/topic/list.html index a4cecaa..bba4f08 100644 --- a/themes/piratecare/layouts/topic/list.html +++ b/themes/piratecare/layouts/topic/list.html @@ -1,7 +1,13 @@ {{ define "main" }} - + {{ $relpermalink := "" }} + {{ range .Data.Pages }} -
> {{ .Title }}
- {{ end }} -
+ {{ if .Site.Data.myvars.edit }} + {{ $relpermalink = printf "%s%s" "/_preview" .RelPermalink }} + {{ else }} + {{ $relpermalink = .RelPermalink }} + {{ end }} +
> {{ .Title }}
+ {{ end }} +
{{ end }}