diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index 5d97b115a..ba7c54d21 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -57,27 +57,25 @@ jobs:
cacheHit: ${{ steps.cache-zotero-bib.outputs.cache-hit }}
runs-on: ubuntu-latest
- concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Get Zotero Version Information
id: zoteroVersion
uses: fjogeleit/http-request-action@v1
with:
- url: "https://api.zotero.org/groups/2914042/items?format=versions"
- method: "GET"
+ url: https://api.zotero.org/groups/2914042/items?format=versions
+ method: GET
- name: Cache Zotero Bibliography
- id: cache-zotero-bib
- uses: actions/cache@v4
- env:
- cache-name: cache-zotero_bib
+ id: cache-zotero
+ uses: actions/cache/restore@v4
with:
- path: ~/data
- key: ${{ fromJson(steps.zoteroVersion.outputs.headers).last-modified-version }}
- restore-keys: |
- ${{ fromJson(steps.zoteroVersion.outputs.headers).last-modified-version }}
+ lookup-only: true
+ path: |
+ static/data/bibliography.json
+ static/data/bibItems
+ content/en/history/bibliography
+ key: bib-${{ fromJson(steps.zoteroVersion.outputs.headers).last-modified-version }}
# ----------------------------------------------------------------------------
# Build the website. This job is conditional, we will always run it on a
@@ -94,31 +92,23 @@ jobs:
fetch-depth: 0
- name: Cache Zotero Bibliography
- id: cache-zotero-bib
+ id: cache-bib
uses: actions/cache@v4
- env:
- cache-name: cache-zotero_bib
with:
- path: ~/data
- key: ${{ needs.check.outputs.zoteroVersion }}
- restore-keys: |
- ${{ needs.check.outputs.zoteroVersion }}
+ path: |
+ static/data/bibliography.json
+ static/data/bibItems
+ content/en/history/bibliography
+ key: bib-${{ needs.check.outputs.zoteroVersion }}
- name: Install Bibliography
- env:
- CACHE_HIT: ${{ steps.cache-zotero-bib.outputs.cache-hit }}
+ if: steps.cache-bib.outputs.cache-hit != 'true'
run: |
- if [[ "$CACHE_HIT" == 'true' ]]; then
- echo "Use Cache"
- sudo cp --recursive ~/data ${GITHUB_WORKSPACE}/static
- ls -la ${GITHUB_WORKSPACE}/static/data
- else
echo "Retrieve bibliography"
cd scripts
chmod +x ./update_bibliography.sh
+ chmod +x ./bibSplit.pl
./update_bibliography.sh
- sudo cp --recursive ${GITHUB_WORKSPACE}/static/data ~/data
- fi
# Install Hugo Extended
#
diff --git a/.gitignore b/.gitignore
index b41f2aa34..5a668c005 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@ _gen/
.hugo_build.lock
.idea
data/bibliography.json
+/docs
diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss
index 8fb20f9f9..9eaee6880 100644
--- a/assets/scss/_styles_project.scss
+++ b/assets/scss/_styles_project.scss
@@ -1,3 +1,5 @@
+@import "publications/publications";
+
.text-center.py-2 .text-white {
display: none;
}
@@ -5,3 +7,9 @@
div.td-page-meta {
display: none;
}
+
+.article-container {
+ max-width: 760px;
+ padding: 0 20px;
+ margin: 0 auto;
+}
diff --git a/config/_default/hugo.yaml b/config/_default/hugo.yaml
index 7ce1140d5..1eb6da3c7 100644
--- a/config/_default/hugo.yaml
+++ b/config/_default/hugo.yaml
@@ -35,9 +35,9 @@ defaultContentLanguageInSubdir: false
enableMissingTranslationPlaceholders: true
# Disable rendering of the specified page kinds
-disableKinds:
- - taxonomy
- - term
+#disableKinds:
+# - term
+# Note terms are needed for taxonomies to work
outputs:
home:
diff --git a/config/_default/languages.yaml b/config/_default/languages.yaml
index 1f0069b6b..6d1441a07 100644
--- a/config/_default/languages.yaml
+++ b/config/_default/languages.yaml
@@ -5,9 +5,14 @@
# See: https://gohugo.io/content-management/multilingual/
#
en:
- languageName: English"
+ languageName: English
+ languageCode: en-us
# Weight used for sorting.
weight: 1
contentDir: content/en
params:
- description: "Dedicated to restoring and preserving the Interlisp experience"
\ No newline at end of file
+ description: "Dedicated to restoring and preserving the Interlisp experience"
+
+ # Languages
+# Create a section for each of your site's languages.
+# Documentation: https://docs.hugoblox.com/reference/language/
diff --git a/config/_default/module.yaml b/config/_default/module.yaml
index 1a537f509..d6c27e0b3 100644
--- a/config/_default/module.yaml
+++ b/config/_default/module.yaml
@@ -8,4 +8,4 @@
- path: "github.com/google/docsy"
disable: false
- path: "github.com/google/docsy/dependencies"
- disable: false
+ disable: false
\ No newline at end of file
diff --git a/config/_default/params.yaml b/config/_default/params.yaml
index 4b708c243..31f85c72a 100644
--- a/config/_default/params.yaml
+++ b/config/_default/params.yaml
@@ -104,7 +104,27 @@ links:
# icon: "fa fa-envelope"
# desc: "Discuss development issues around the project"
-taxonomies:
+taxonomy:
+ taxonomyCloud:
+ - authors
+ taxonomyCloudTitle:
+ - Authors
+ taxonomyPageHeader:
+ - authors
+ - item_type
+
+#related:
+# threshold: 80
+# includeNewer: true
+# toLower: true
+# indices:
+# - name: item_type
+# weight: 5
+# - name: tags
+# weight: 100
+# - name: categories
+# weight: 70
+
# Nothing defined
# User Interface Configuration options
@@ -150,7 +170,7 @@ ui:
sidebar_cache_limit: 100
# We have almost 200 attributes; don't truncate the sidebar to max 50 contents.
- sidebar_menu_truncate: 1000
+ sidebar_menu_truncate: 0
# Set to true to disable breadcrumb navigation.
breadcrumb_disable: false
@@ -163,3 +183,18 @@ ui:
# Identify the custom css files
custom_css:
- "css/custom.css"
+
+# Extensions -- From wowchemy
+
+extensions:
+ decap_cms:
+ branch: main
+ local_backend: false
+ academicons:
+ enable: true
+
+# Citation style
+
+publications:
+ date_format: January 2006
+ citation_style: apa
\ No newline at end of file
diff --git a/config/_default/permalinks.yaml b/config/_default/permalinks.yaml
index b6b31af21..3e427038d 100644
--- a/config/_default/permalinks.yaml
+++ b/config/_default/permalinks.yaml
@@ -6,4 +6,9 @@
#
# see: https://gohugo.io/content-management/urls/#permalinks
#
-blog: /:section/:year/:month/:day/:slug/
\ No newline at end of file
+blog: '/:section/:year/:month/:day/:slug/'
+
+authors: '/author/:slug/'
+tags: '/tag/:slug/'
+categories: '/category/:slug/'
+publication_types: '/publication-type/:slug/'
\ No newline at end of file
diff --git a/config/_default/services.yaml b/config/_default/services.yaml
new file mode 100644
index 000000000..91a80a6a3
--- /dev/null
+++ b/config/_default/services.yaml
@@ -0,0 +1,5 @@
+rss:
+ limit: -1
+ title: "Interlisp.org RSS Feed"
+ description: "The latest news from Interlisp.org"
+ link: "https://interlisp.org"
\ No newline at end of file
diff --git a/config/_default/taxonomies.yaml b/config/_default/taxonomies.yaml
new file mode 100644
index 000000000..b6bb7949c
--- /dev/null
+++ b/config/_default/taxonomies.yaml
@@ -0,0 +1,4 @@
+tag: tags
+category: categories
+author: authors
+item_type: item_type
\ No newline at end of file
diff --git a/content/en/history/bibliography/_index.md b/content/en/history/bibliography/_index.md
index 376de97f8..af682331c 100644
--- a/content/en/history/bibliography/_index.md
+++ b/content/en/history/bibliography/_index.md
@@ -1,14 +1,12 @@
---
title: Bibliography
+heading: Interlisp Bibliography
+type: bibliography
+cascade:
+ type: bibliography
weight: 5
-type: docs
aliases:
- /bibliography/
---
-
-## Interlisp Bibliography
-
(This bibliography is kept in sync with our [Zotero](https://www.zotero.org/) collection [Library](https://www.zotero.org/groups/2914042/interlisp/library).
-
-{{< bibTable >}}
diff --git a/go.mod b/go.mod
index b96314dad..ee9a5f6c8 100644
--- a/go.mod
+++ b/go.mod
@@ -3,6 +3,6 @@ module github.com/Interlisp/Interlisp.github.io
go 1.20
require (
- github.com/google/docsy v0.10.0 // indirect
+ github.com/google/docsy v0.12.0 // indirect
github.com/google/docsy/dependencies v0.7.2 // indirect
)
diff --git a/go.sum b/go.sum
index 22e30c371..b4841ac6e 100644
--- a/go.sum
+++ b/go.sum
@@ -1,13 +1,12 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/FortAwesome/Font-Awesome v0.0.0-20240108205627-a1232e345536/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/FortAwesome/Font-Awesome v0.0.0-20240402185447-c0f460dca7f7/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
-github.com/google/docsy v0.9.1 h1:+jqges1YCd+yHeuZ1BUvD8V8mEGVtPxULg5j/vaJ984=
-github.com/google/docsy v0.9.1/go.mod h1:saOqKEUOn07Bc0orM/JdIF3VkOanHta9LU5Y53bwN2U=
-github.com/google/docsy v0.10.0 h1:6tMDacPwAyRWNCfvsn/9qGOZDQ8b0aRzjRZvnZPY5dg=
-github.com/google/docsy v0.10.0/go.mod h1:c0nIAqmRTOuJ01F85U/wJPQtc3Zj9N58Kea9bOT2AJc=
-github.com/google/docsy/dependencies v0.6.0/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE=
+github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
+github.com/google/docsy v0.12.0 h1:CddZKL39YyJzawr8GTVaakvcUTCJRAAYdz7W0qfZ2P4=
+github.com/google/docsy v0.12.0/go.mod h1:1bioDqA493neyFesaTvQ9reV0V2vYy+xUAnlnz7+miM=
github.com/google/docsy/dependencies v0.7.2 h1:+t5ufoADQAj4XneFphz4A+UU0ICAxmNaRHVWtMYXPSI=
github.com/google/docsy/dependencies v0.7.2/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=
github.com/twbs/bootstrap v4.6.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
+github.com/twbs/bootstrap v5.3.6+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
diff --git a/layouts/bibliography/baseof.html b/layouts/bibliography/baseof.html
new file mode 100644
index 000000000..ebd44c94b
--- /dev/null
+++ b/layouts/bibliography/baseof.html
@@ -0,0 +1,34 @@
+
+
+
+ {{ partial "head.html" . }}
+
+
+
+ {{ partial "navbar.html" . }}
+
+
+
+
+
+
+ {{ partial "version-banner.html" . }}
+ {{ if not (.Param "ui.breadcrumb_disable") -}}
+ {{ partial "breadcrumb.html" . -}}
+ {{ end -}}
+ {{ block "main" . }}{{ end }}
+
+
+
+ {{ partial "footer.html" . }}
+
+ {{ partial "scripts.html" . }}
+
+
\ No newline at end of file
diff --git a/layouts/bibliography/list.html b/layouts/bibliography/list.html
new file mode 100644
index 000000000..46abbca3f
--- /dev/null
+++ b/layouts/bibliography/list.html
@@ -0,0 +1,156 @@
+{{ define "sidebar" }}{{ end }}
+{{ define "main" }}
+
+
+
+{{ .Content }}
+
+
+
+ {{- $previewWordLimit := 24 -}}
+
+ {{- /* Get all regular pages in this section */ -}}
+ {{ $pages := .RegularPages }}
+ {{- /* Sort by date descending, then title ascending */ -}}
+ {{- $pages = sort $pages "Date" "desc" -}}
+ {{- $pages = sort $pages "Title" "asc" -}}
+
+ {{- /* Render the list of publications */ -}}
+
+
+ {{ range $pages }}
+ {{- /* Collect item_type terms as a comma-separated, lowercased string */ -}}
+ {{- $types := "" -}}
+ {{- with .Params.item_type -}}
+ {{- if reflect.IsSlice . -}}
+ {{- $types = delimit (apply . "lower" ".") "," -}}
+ {{- else -}}
+ {{- $types = (lower .) -}}
+ {{- end -}}
+ {{- end -}}
+
+
+ {{- $rawTitle := or .Params.title .Title -}}
+ {{- $rendered := replaceRE "^(.*)
$" "$1" $rawTitle -}}
+ {{- /* The plainify corrupts values that look like HTML but aren't: "Special files on ARs>" */ -}}
+ {{- /* $rendered = $rendered | plainify | htmlEscape */ -}}
+ {{- $rendered = $rendered | htmlEscape -}}
+ {{- $rendered | safeHTML -}}
+
+ {{- /* Safe date: use front matter date only if non-empty & matches basic pattern */ -}}
+ {{- $authors := .Params.authors -}}
+ {{- $editors := .Params.editors -}}
+ {{- $isPatent := eq .Params.item_type "patent" -}}
+ {{- /* warnf "authors: %v" $authors */ -}}
+ {{- if or $authors $editors -}}
+ {{- if $authors -}}
+ {{- if reflect.IsSlice $authors -}}
+ {{- if $isPatent }}
+ Inventors:
+ {{ end }}
+ {{ delimit $authors "; " "; and " }}
+ {{- else -}}
+ {{- if $isPatent }}
+ Inventor:
+ {{ end }}
+ {{ $authors }}
+ {{- end -}}
+ {{- else -}}
+ Edited by:
+ {{ if reflect.IsSlice $editors -}}
+ {{ delimit $editors "; " "; and " }}
+ {{- else -}}
+ {{ $editors }}
+ {{- end -}}
+ {{- end -}}
+
+ {{- end -}}
+
+ {{- $d := .Date -}}
+ {{- with .Params.date -}}
+ {{- $datestr := trim . " " -}}
+ {{- if and (ne $datestr "") (findRE `^\d{4}-\d{2}-\d{2}` $datestr) -}}
+ {{- $d = time $datestr -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $d = $d.Format "2006-01-02" -}}
+ {{- /* Don't display bogus date */ -}}
+ {{- if (ne $d "0001-01-01") }}
+ {{ $d }}
+ {{ end -}}
+
+ {{ with .Params.abstract -}}
+ {{- /* can't plainify, as above */ -}}
+ {{- /* $plain := . | plainify | htmlEscape | replaceRE `\s+` " " */ -}}
+ {{- $plain := . | htmlEscape | replaceRE `\s+` " " -}}
+ {{- $previewing := gt (countwords $plain) $previewWordLimit -}}
+ {{- $preview := "" -}}
+ {{- if $previewing -}}
+ {{- $previewWords := split $plain " " | first $previewWordLimit -}}
+ {{- $preview = delimit $previewWords " " -}}
+ {{- else -}}
+ {{- $preview = replace . "\n" " " -}}
+ {{- end -}}
+
+ {{ $preview | safeHTML }}{{ if $previewing }}…{{ end }}
+
+ {{- end -}}
+
+
+ {{ end }}
+
+
+
+
+{{ end }}
+
diff --git a/layouts/bibliography/single.html b/layouts/bibliography/single.html
new file mode 100644
index 000000000..df1d70ca1
--- /dev/null
+++ b/layouts/bibliography/single.html
@@ -0,0 +1,221 @@
+{{ define "main" }}
+
+ {{ .Title }}
+
+{{- $authors := .Params.authors -}}
+{{- $editors := .Params.editors -}}
+{{- $isPatent := eq .Params.item_type "patent" -}}
+{{- if or $authors $editors -}} {{- /* no empty if neither */ -}}
+
+ {{- if $authors -}}
+ {{- if reflect.IsSlice $authors -}}
+ {{- if $isPatent }}
+ Inventors:
+ {{ end }}
+ {{ delimit $authors "; " "; and " }}
+ {{- else -}}
+ {{- if $isPatent }}
+ Inventor:
+ {{ end }}
+ {{ $authors }}
+ {{- end -}}
+ {{- else -}}
+ Edited by:
+ {{ if reflect.IsSlice $editors }}
+ {{ delimit $editors "; " "; and " }}
+ {{- else }}
+ {{ $editors }}
+ {{- end -}}
+ {{- end -}}
+
+{{- end -}}
+
+
+ {{- $d := .Date -}}
+ {{- with .Params.date -}}
+ {{- $datestr := trim . " " -}}
+ {{- if and (ne $datestr "") (findRE `^\d{4}-\d{2}-\d{2}` $datestr) -}}
+ {{- $d = time $datestr -}}
+ {{- end -}}
+ {{- end }}
+ {{- $d = $d.Format "2006-01-02" -}}
+ {{- /* Don't display bogus date */ -}}
+ {{- if (ne $d "0001-01-01") }}
+ {{ $d }}
+ {{ end -}}
+
+
+ View document: {{ with .Params.url_source }}
+ {{ . }}
+ {{ else }}
+ No URL to the document is available.
+ {{ end }}
+
+ Cite: placeholder for link to retrieve citation from Zotero
+
+
+ Abstract
+
+ {{ with .Params.abstract }}
+ {{ . | markdownify }}
+ {{ else }}
+ No abstract available.
+ {{ end }}
+
+
+
+
+ {{ if eq .Params.item_type "book" }}
+ {{ with .Params.publisher }}
+
Publisher: {{ . }}
+ {{ end }}
+ {{ with .Params.place }}
+ {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "paper-conference" }}
+ {{ with .Params.proceedings_title }}
+ Proceedings: {{ . }}
+ {{ end }}
+ {{ with .Params.publisher }}
+ Journal: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "article" }}
+ {{ with .Params.publisher }}
+ Publisher: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "article-journal" }}
+ {{ with .Params.publication_title }}
+ Journal: {{ . }}
+ {{ end }}
+ {{ with .Params.volume }}
+ Volume: {{ . }}
+ {{ end }}
+ {{ with .Params.issue }}
+ Issue: {{ . }}
+ {{ end }}
+ {{ with .Params.pages }}
+ Pages: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "report" }}
+ {{ with .Params.publication_title }}
+ Publisher: {{ . }}
+ {{ end }}
+ {{ with .Params.reportType }}
+ Report Type: {{ . }}
+ {{ end }}
+ {{ with .Params.reportNumber }}
+ Report Number: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "thesis" }}
+ {{ with .Params.university }}
+ University: {{ . }}
+ {{ end }}
+ {{ with .Params.place }}
+ Place: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "patent" }}
+ {{ with .Params.assignee }}
+ Assignee: {{ . }}
+ {{ end }}
+ {{ with .Params.application_number }}
+ Application Number: {{ . }}
+ {{ end }}
+ {{ with .Params.filing_date }}
+ Filing Date: {{ . }}
+ {{ end }}
+ {{ with .Params.issuing_authority }}
+ Issuing Authority: {{ . }}
+ {{ end }}
+ {{ with .Params.patent_number }}
+ Patent Number: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "post-weblog" }}
+ {{ with .Params.blog_title }}
+ Blog Title: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "article-magazine" }}
+ {{ with .Params.publication_title }}
+ Magazine: {{ . }}
+ {{ end }}
+ {{ with .Params.volume }}
+ Volume: {{ . }}
+ {{ end }}
+ {{ with .Params.issue }}
+ Issue: {{ . }}
+ {{ end }}
+ {{ with .Params.pages }}
+ Pages: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "motion_picture" }}
+ {{ with .Params.studio }}
+ Studio: {{ . }}
+ {{ end }}
+ {{ with .Params.video_recording_format }}
+ Video Recording Format: {{ . }}
+ {{ end }}
+ {{ with .Params.series_title }}
+ Series Title: {{ . }}
+ {{ end }}
+ {{ with .Params.volume }}
+ Volume: {{ . }}
+ {{ end }}
+ {{ with .Params.number_of_volumes }}
+ Number of Volumes: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "chapter" }}
+ {{ with .Params.book_title }}
+ Book Title: {{ . }}
+ {{ end }}
+ {{ with .Params.publisher }}
+ Publisher: {{ . }}
+ {{ end }}
+ {{ with .Params.series }}
+ Series: {{ . }}
+ {{ end }}
+ {{ with .Params.series_number }}
+ Series Number: {{ . }}
+ {{ end }}
+ {{ with .Params.pages }}
+ Pages: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "personal_communication" }}
+ {{ with .Params.communication_type }}
+ Item Type: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "webpage" }}
+ {{ with .Params.website_title }}
+ Website Title: {{ . }}
+ {{ end }}
+ {{ with .Params.website_type }}
+ Website Type: {{ . }}
+ {{ end }}
+ {{ end }}
+ {{ if eq .Params.item_type "entry-encyclopedia" }}
+ {{ with .Params.encyclopedia_title }}
+ Encyclopedia Title: {{ . }}
+ {{ end }}
+ {{ end }}
+
+
+ {{- if .Params.zotero_url }}
+ View on Zotero
+ {{- end -}}
+
+
+
+ {{ .Content }}
+
+
+{{ end }}
diff --git a/layouts/partials/taxonomy_terms_cloud.html b/layouts/partials/taxonomy_terms_cloud.html
new file mode 100644
index 000000000..6a333c433
--- /dev/null
+++ b/layouts/partials/taxonomy_terms_cloud.html
@@ -0,0 +1,21 @@
+{{ $context := .context -}}
+{{ $taxo := .taxo -}}
+{{ $title := .title -}}
+
+{{ if eq $context.Type "bibliography" }}
+ {{ if isset $context.Site.Taxonomies (lower $taxo) -}}
+ {{ $taxonomy := index $context.Site.Taxonomies (lower $taxo) -}}
+ {{ if (gt (len $taxonomy) 0) -}}
+
+ {{ with $title -}}
+
{{ . }}
+ {{ end -}}
+
+
+ {{ end -}}
+ {{ end -}}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/shortcodes/bibTable.html b/layouts/shortcodes/bibItem.html
similarity index 50%
rename from layouts/shortcodes/bibTable.html
rename to layouts/shortcodes/bibItem.html
index c9fc28ec7..82085b925 100644
--- a/layouts/shortcodes/bibTable.html
+++ b/layouts/shortcodes/bibItem.html
@@ -14,10 +14,7 @@
.abstractContent {
padding: 5px;
margin: 0 5px 0 15px;
- display: none;
- font-size: 0.9rem;
- overflow: hidden;
- background-color: #e8e8ff;
+ font-size: 1.0rem;
clear: both;
}
@@ -30,12 +27,6 @@
color: white;
}
-.bibTitle {
- font-weight: 700;
-}
-
-.authors { margin: 5px auto 2px 5px; }
-
.tooltipNotes {
position: relative;
display: inline-block;
@@ -145,72 +136,129 @@
border-color: #555 transparent transparent transparent;
}
+.label {
+ font-weight: 700;
+}
+
-{{ $notesIcon := "\u24C3" }}
-{{ $nonBreakingHyphen := "\u2011" }}
+{{- $notesIcon := "\u24C3" -}}
+{{- $nonBreakingHyphen := "\u2011" -}}
-/*
-var abstractExpanderOpen = "Abstract +";
-var abstractExpanderClose = "Abstract -";
-*/
-
-
-
-
- Reference
-
-
-
- {{ $years_items := dict }}
- {{ $bib := resources.Get "data/bibliography.json" }}
- {{ with $bib }}
- {{ with . | transform.Unmarshal }}
- {{ $years_items = . }}
- {{ end }}
- {{ else }}
- {{ errorf "Unable to get global resource 'data/bibliography.json'" }}
- {{ end }}
- {{ range $year, $items := $years_items }}
-
- {{ $year }}
-
- {{ range $items }}
-
- {{ $itemID := (cond (gt (len .id) 0) (replace .id `/` `_`) `_0`) }}
-
- {{ if or .author .editor }}{{ if not .author }}Edited by: {{ end }}{{ range $naE, $auEd := or .author .editor }}{{ if $naE }}; {{ end }}{{ if $auEd.literal }}{{ $auEd.literal }}{{ else if and $auEd.family $auEd.given }}{{ $auEd.family }}, {{ $auEd.given }}{{ else }}{{ $auEd.family }}{{ $auEd.given }}{{ end }}{{ end }}
-
{{ end }}
- {{ if .abstract }}AAA {{ end }}
- {{ if and false .note }}
- {{ $notes := split (plainify .note) "\n" }}
- Notes
-
- {{ range $nn, $note := $notes }}
- {{if strings.ContainsNonSpace $note }}
- {{ if $nn }} {{ end }}
- {{ print (safeJS (replace (replace (htmlUnescape $note) "-" $nonBreakingHyphen) " " " ")) }}
- {{ end }}
- {{ end }}
- {{ end }}
- {{ if .abstract }}
- {{ range $na, $abstract := split (plainify .abstract) "\n" }}
- {{if strings.ContainsNonSpace $abstract }}
- {{ if $na }} {{ end }}
- {{ $trimmed := strings.TrimLeft " " $abstract }}{{ $indent := (sub ($abstract | len) ($trimmed | len)) }}
- {{ print (safeJS (htmlUnescape (printf "%s" $trimmed | printf "%s%s" (strings.Repeat $indent " ") | printf "%s"))) }}
- {{ end }}
- {{ end }}
-
{{ end }}
-
- {{ end }}
- {{ end }}
-
-
-
+{{ $item := dict -}}
+{{- $jsonFile := printf "data/bibItems/%s.json" (.Get "key") -}}
+{{- $bib := resources.Get $jsonFile -}}
+{{- with $bib -}}
+ {{- with . | transform.Unmarshal -}}
+ {{- $item = . -}}
+ {{- end -}}
+{{- else -}}
+ {{- $jsonFile | errorf "Unable to get item resource '%s'" -}}
+{{- end -}}
+{{- with $item -}}
+ {{- if or .author .editor -}}
+
+ {{- if not .author -}}Edited by: {{- end -}}
+ {{- range $naE, $auEd := or .author .editor -}}
+ {{- if $naE -}}; {{ end -}}
+ {{- if $auEd.literal -}}
+ {{- $auEd.literal -}}
+ {{- else if and $auEd.family $auEd.given -}}
+ {{- $auEd.family -}}, {{- $auEd.given -}}
+ {{- else -}}
+ {{- $auEd.family -}}{{- $auEd.given -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- end -}}
+ {{- if .url }}
+
+ {{ end -}}
+ {{- if eq .itemType "journalArticle" -}}
+ {{- $journalTitle := or .publicationTitle .journalAbbreviation -}}
+ {{- if $journalTitle }}
+Publication: {{ $journalTitle -}}
+ {{- end -}}
+ {{- if .volume }}
+Volume: {{ .volume -}}
+ {{- end -}}
+ {{- if .issue }}
+Issue: {{ .issue -}}
+ {{- end -}}
+ {{- $date := "" -}}
+ {{- if .issuedDateParts -}}
+ {{- $dp := .issuedDateParts -}}
+ {{- $dpl := len $dp -}}
+ {{- $dpf := "January 1, 1900" -}}
+ {{- $y := 0 -}}
+ {{- $m := 10 -}}
+ {{- $d := 18 -}}
+ {{- if ge $dpl 1 -}}
+ {{- $y := strings.TrimLeft "0" (string (index $dp 0)) | int -}}
+ {{- $dpf := "1900" -}}
+ {{- end -}}
+ {{- if ge $dpl 2 -}}
+ {{- $m := strings.TrimLeft "0" (string (index $dp 1)) | int -}}
+ {{- $dpf := "January 1900" -}}
+ {{- end -}}
+ {{- if ge $dpl 3 -}}
+ {{- $d := strings.TrimLeft "0" (string (index $dp 2)) | int -}}
+ {{- $dpf := "January 1, 1900" -}}
+ {{- end -}}
+ {{- if $y -}}
+ {{- $t := printf "%4d-%2d-%2d" $y $m $d -}}
+ {{- $dp := time.AsTime $t -}}
+ {{- $date := $dp.Format $dpf -}}
+ {{- end -}}
+ {{- end -}}
+ {{- if and (not $date) .date -}}
+ {{- $date := .date -}}
+ {{- end -}}
+ {{- if $date }}
+Date: {{ $date -}}
+ {{- end -}}
+ {{- $pages := or .pages .page -}}
+ {{- if $pages }}
+Pages: {{ $pages -}}
+ {{- end -}}
+ {{- end -}}
+ {{- if .DOI }}
+DOI: {{ .DOI -}}
+ {{- end -}}
+ {{- if .ISSN }}
+ISSN: {{ .ISSN -}}
+ {{- end -}}
+ {{- if .abstract }}
+Abstract:
+ {{- range $na, $abstract := split (plainify .abstract) "\n" -}}
+ {{- if $na -}} {{- end -}}
+ {{if strings.ContainsNonSpace $abstract -}}
+ {{- $trimmed := strings.TrimLeft " " $abstract -}}{{- $indent := (sub ($abstract | len) ($trimmed | len)) -}}
+ {{- print (safeJS (htmlUnescape (printf "%s" $trimmed | printf "%s%s" (strings.Repeat $indent " ") | printf "%s"))) -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{ end -}}
+ {{- if and false .note -}}
+ {{- $itemID := (cond (gt (len .id) 0) (replace .id `/` `_`) `_0`) -}}
+ {{- $notes := split (plainify .note) "\n" -}}
+ Notes
+
+ {{- range $nn, $note := $notes -}}
+ {{if strings.ContainsNonSpace $note -}}
+ {{- if $nn -}} {{- end -}}
+ {{- print (safeJS (replace (replace (htmlUnescape $note) "-" $nonBreakingHyphen) " " " ")) -}}
+ {{- end -}}
+ {{- end -}}
+
+
+ {{- end -}}
+{{- end -}}
+