BREAKING CHANGE! allowing for library to be located elsewhere; also changed json catalog's name to catalog
This commit is contained in:
parent
cdd8980adb
commit
a8abce8c5f
|
@ -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]
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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 -}}
|
||||
<span>{{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}.<a href="/library/BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank"><span class="sup">bib⁄</span><i>‘{{- $b.title -}}’</i></a>. {{- with $b.publisher -}}{{- . -}}.{{- end -}}</span>
|
||||
<span>{{- delimit $b.authors ", " " & " -}}{{- with $b.pubdate -}}, {{- substr . 0 4}}{{- end -}}.<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank"><span class="sup">bib⁄</span><i>‘{{- $b.title -}}’</i></a>. {{- with $b.publisher -}}{{- . -}}.{{- end -}}</span>
|
||||
{{- else -}}
|
||||
<a href="/library/BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank">{{- $text_link -}}</a>
|
||||
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with $b.title}} title="{{- . -}}"{{- end -}} target="_blank">{{- $text_link -}}</a>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
<a href="/library/BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">bib:{{- $destination -}} not found</span></a>
|
||||
<a href="{{- $c_prefix | safeURL -}}BROWSE_LIBRARY.html#/book/{{- $destination -}}"{{- with .Title}} title="{{- . -}}"{{- end -}}>{{- $text_link -}}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">bib:{{- $destination -}} not found</span></a>
|
||||
{{- end -}}
|
||||
{{- else if strings.HasPrefix .Destination "session:" -}}
|
||||
{{- $s_destination := printf "/session/%s" (substr .Destination 8) -}}
|
||||
|
|
Loading…
Reference in New Issue