New catalog, hosting from hyper

This commit is contained in:
Sean Dockray 2020-06-10 09:45:59 +10:00
parent d20750cd0c
commit f0091fb43f
4 changed files with 8 additions and 6 deletions

View File

@ -10,6 +10,7 @@ disableKinds = ["RSS", "sitemap", "taxonomy"]
images = ["/images/machinelistening.png"] images = ["/images/machinelistening.png"]
title = "Machine Listening Syllabus" title = "Machine Listening Syllabus"
giturl = "https://git.memoryoftheworld.org/KnowledgeProduction/machinelistening" giturl = "https://git.memoryoftheworld.org/KnowledgeProduction/machinelistening"
catalogprefix = "hyper://18f79903cb7ce4f1f3c05449418505a296bb2c4e851f7dc9444cf87ed45fb194/"
[outputFormats] [outputFormats]
[outputFormats.js] [outputFormats.js]

1
data/books/catalog.json Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,15 +1,16 @@
{{- $text_link := .Text -}} {{- $text_link := .Text -}}
{{- if strings.HasPrefix .Destination "bib:" -}} {{- if strings.HasPrefix .Destination "bib:" -}}
{{- $destination := (substr .Destination 4) -}} {{- $destination := (substr .Destination 4) -}}
{{- if index $.Page.Site.Data.books.piratecarecollection $destination -}} {{- $c_prefix := .Page.Site.Params.catalogprefix | default "/library/" -}}
{{- $b := index $.Page.Site.Data.books.piratecarecollection $destination -}} {{- if index $.Page.Site.Data.books.catalog $destination -}}
{{- $b := index $.Page.Site.Data.books.catalog $destination -}}
{{- if not $text_link -}} {{- 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"><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"><i>{{- $b.title -}}</i></a>. {{- with $b.publisher -}}{{- . -}}.{{- end -}}</span>
{{- else -}} {{- 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 -}} {{- end -}}
{{- else -}} {{- 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 -}} {{- end -}}
{{- else if strings.HasPrefix .Destination "session:" -}} {{- else if strings.HasPrefix .Destination "session:" -}}
{{- $s_destination := printf "/session/%s" (substr .Destination 8) -}} {{- $s_destination := printf "/session/%s" (substr .Destination 8) -}}