{{- $text_link := .Text -}} {{- if strings.HasPrefix .Destination "bib:" -}} {{- $destination := (substr .Destination 4) -}} {{- $c_prefix := .Page.Site.Params.catalogprefix | default "/library/" -}} {{- if index $.Page.Site.Data.books.catalog $destination -}} {{- $b := index $.Page.Site.Data.books.catalog $destination -}} {{- if not $text_link -}} {{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}.bib⁄‘{{- $b.title -}}’. {{- with $b.publisher -}}{{- . -}}.{{- end -}} {{- else -}} {{- $text_link -}} {{- end -}} {{- else -}} {{- $text_link -}}⦚bib:{{- $destination -}} not found {{- end -}} {{- else if strings.HasPrefix .Destination "session:" -}} {{- $s_destination := printf "/session/%s" (substr .Destination 8) -}} {{- if $.Page.Site.GetPage $s_destination -}} {{- $session := $.Page.Site.GetPage $s_destination -}} {{- if not $text_link -}} session⁄{{- $session.Title -}} {{- else -}} session⁄{{- $text_link -}} {{- end -}} {{- else -}} {{- $text_link -}}⦚session:{{- $s_destination -}} not found {{- end -}} {{- else if strings.HasPrefix .Destination "topic:" -}} {{- $t_destination := printf "/topic/%s" (substr .Destination 6) -}} {{- if $.Page.Site.GetPage $t_destination -}} {{- $topic := $.Page.Site.GetPage $t_destination -}} {{- if not $text_link -}} topic⁄{{- $topic.Title -}} {{- else -}} topic⁄{{- $text_link -}} {{- end -}} {{- else -}} {{- $text_link -}}⦚topic:{{- $t_destination -}} not found {{- end -}} {{- else if strings.HasPrefix .Destination "audio:" -}} {{- $a_destination := (substr .Destination 6) -}} {{- if findRE "^.*static" $a_destination -}}