diff --git a/config/_default/config-local.toml b/config/_default/config-local.toml index 4caff5a..c30381d 100644 --- a/config/_default/config-local.toml +++ b/config/_default/config-local.toml @@ -11,6 +11,7 @@ disableKinds = ["RSS", "sitemap"] title = "Pirate Care Syllabus" giturl = "http://localhost:3000/gitea/pirate-care-syllabus" home = "syllabus" + catalogprefix = "hyper://18f79903cb7ce4f1f3c05449418505a296bb2c4e851f7dc9444cf87ed45fb194/" [outputFormats] [outputFormats.js] diff --git a/config/_default/config.toml b/config/_default/config.toml index cd8b442..373bb24 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -11,6 +11,7 @@ disableKinds = ["RSS", "sitemap"] title = "Pirate Care Syllabus" giturl = "https://git.memoryoftheworld.org/PirateCare/Syllabus" home = "syllabus" + catalogprefix = "/library/" [outputFormats] [outputFormats.js] diff --git a/themes/sandpoints/layouts/_default/_markup/render-image.html b/themes/sandpoints/layouts/_default/_markup/render-image.html index 5521176..166813e 100644 --- a/themes/sandpoints/layouts/_default/_markup/render-image.html +++ b/themes/sandpoints/layouts/_default/_markup/render-image.html @@ -1,15 +1,16 @@ {{- $text_link := .Text -}} {{- if strings.HasPrefix .Destination "bib:" -}} {{- $destination := (substr .Destination 4) -}} - {{- if index $.Page.Site.Data.books.piratecarecollection $destination -}} - {{- $b := index $.Page.Site.Data.books.piratecarecollection $destination -}} + {{- $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 -}} + {{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}.bib⁄‘{{- $b.title -}}’. {{- with $b.publisher -}}{{- . -}}.{{- end -}} {{- else -}} - {{- $text_link -}} + {{- $text_link -}} {{- end -}} {{- else -}} - {{- $text_link -}}⦚bib:{{- $destination -}} not found + {{- $text_link -}}⦚bib:{{- $destination -}} not found {{- end -}} {{- else if strings.HasPrefix .Destination "session:" -}} {{- $s_destination := printf "/session/%s" (substr .Destination 8) -}}