Skip to content

Commit c21b85a

Browse files
stumboMattHeffron
andauthored
Bs1 bibliography (#295)
* Initial attempt to create individual pages for the Bibliography entries. 1. The "main" Bibliography page is not (yet) modified to reference these. 2. This fails when hugo tries to render the html for the generated .md files. The error from Hugo (it reports 4 then seems to hang): ERROR render of "/home/matt/Interlisp/Interlisp.github.io/content/en/history/bibliography/2LJ5ITDD.md" failed: "/home/matt/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/[email protected]/layouts/docs/single.html:2:3": execute of template failed: template: docs/single.html:2:3: executing "main" at <.Render>: error calling Render: failed to execute template content.html: "/home/matt/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/[email protected]/layouts/_default/content.html:10:4": execute of template failed: template: content.html:10:4: executing "content.html" at <.Content>: error calling Content: "/home/matt/Interlisp/Interlisp.github.io/content/en/history/bibliography/2LJ5ITDD.md:8:1": failed to render shortcode "bibItem": failed to process shortcode: "/home/matt/Interlisp/Interlisp.github.io/layouts/shortcodes/bibItem.html:168:23": execute of template failed: template: _shortcodes/bibitem.html:168:23: executing "_shortcodes/bibitem.html" at <.params.bibItem>: can't evaluate field params in type *hugolib.ShortcodeWithPage * Improved, but still work in progress. This now creates the files but has some difficulties. The main Bibliography page hasn't been changed. * Update github action to set bibSplit.pl executable * Publications Page -- work in progress * WIP * WIP * Bibliography WIP Crude listing generated in /pulications folder. * Initial implementation of list of all bibliography entries Primitive first pass. Provides a chronological list of all bibliography entires providing titles, authors, date and an abbreviated start of the abstract (limted to 24 words). In addition, a link is enclosed that goes to the markdown file that represents the bibliography entry. Currently, there is nothing implemented to show the contents of the md file. There is no bibliography css implemented to format the list items. This provides an initial proof of concept. A simple framework that can be extended and styled to get us where we want to go. * Initial implementation of list of all bibliography entries Primitive first pass. Provides a chronological list of all bibliography entires providing titles, authors, date and an abbreviated start of the abstract (limted to 24 words). In addition, a link is enclosed that goes to the markdown file that represents the bibliography entry. Currently, there is nothing implemented to show the contents of the md file. There is no bibliography css implemented to format the list items. This provides an initial proof of concept. A simple framework that can be extended and styled to get us where we want to go. * Updates to bibliography page The bibliography md files are build using the update_bibliography.sh script. bib-fns.jq provides functions to reformat the Zotero JSON. bibSplit.pl creates the md file and a data file containing the JSON for each page. Future work will remove the JSON data files once all the content is encompassed in the md file. Added new document type bibliography to generate the list of bibliography entries. layouts/bibliography/list.html provides this functionality. It also currently includes some light css to format the output. The css will eventually be moved into a standalone file within the Hugo ecosystem. Removed the original publication type and its associated files in layouts. Removed some HugoBlox files. They were left over from an early attempt to create a bibliography using HugoBlox as a template. Updated gh-pages.yml, the GHA, to cache the md pages and JSON files. Rewrote the caching to make it more efficient and easier to follow. * Update bibliography entry to link to Zotero The Read Me link now points to the Zotero entry for each item. * Add missing edits. * Update Zotero link wording and open in new tab * Fixed a few Hugo syntax errors. Changed the de-html & re-html encoding to remove unnecessary encoding of html entities. bibSplit.pl errors go to STDERR update_bibliography.sh redirects those errors to bibSplit.err file. I cannot find Hugo documentation showing why _ in truncated abstract renders as ellipsis. * Updates to author tags Authors are now stored as a list of strings in the YAML, one author per line in the list. Previously all the authors were consolidated into a single string. * Start of building out individual bibliography pages Create baseof.html - framework for bibliography screen single.html - layout of individual entry Updated list.html - with baseof, <br>s added at beginning of file are no longer needed. Updated bibSplit.pl specify each page as a bibliography page. * Continued work on creating individual entries. Build out parsing of json to get needed items and putting the items into the generated pages. * Finish individual bibliography entry creation Individual bibliography entries are created for all document types. Customized the entries shown based on Zotero entries. Added url, left placeholder for citation. Updated list of bibliography entries to link to individual entries. * Taxonomy initial work. Still WIP * Some edge case cleanups. A hack for bulleted list in Abstracts. Some rearranging for consistency between the list and single views. Other tweaks for my preferences. * Taxonomy support for filtering bibliographical entries Add bibliographical support for item_type (the type of bibliographic entry) and author. Provide support for filtering bibliographic list by both types of tags. * Turn off saving of the 00-rawItems.json and tags.json files. * Added command line processing to avoid needing to edit the file while debugging changes. Included usage information. The previous behavior (no command line options) is unchanged. (No modification to invocation required.) * Remove storing of individual .json files and unused files. Clean out some old files js & scss from earlier bibliography work. * Cleanup versions in go.sum * Remove cite placeholder. --------- Co-authored-by: Matt Heffron <[email protected]>
1 parent b28d761 commit c21b85a

File tree

20 files changed

+1138
-180
lines changed

20 files changed

+1138
-180
lines changed

.github/workflows/gh-pages.yml

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -57,27 +57,25 @@ jobs:
5757
cacheHit: ${{ steps.cache-zotero-bib.outputs.cache-hit }}
5858

5959
runs-on: ubuntu-latest
60-
concurrency:
61-
group: ${{ github.workflow }}-${{ github.ref }}
6260
steps:
6361

6462
- name: Get Zotero Version Information
6563
id: zoteroVersion
6664
uses: fjogeleit/http-request-action@v1
6765
with:
68-
url: "https://api.zotero.org/groups/2914042/items?format=versions"
69-
method: "GET"
66+
url: https://api.zotero.org/groups/2914042/items?format=versions
67+
method: GET
7068

7169
- name: Cache Zotero Bibliography
72-
id: cache-zotero-bib
73-
uses: actions/cache@v4
74-
env:
75-
cache-name: cache-zotero_bib
70+
id: cache-zotero
71+
uses: actions/cache/restore@v4
7672
with:
77-
path: ~/data
78-
key: ${{ fromJson(steps.zoteroVersion.outputs.headers).last-modified-version }}
79-
restore-keys: |
80-
${{ fromJson(steps.zoteroVersion.outputs.headers).last-modified-version }}
73+
lookup-only: true
74+
path: |
75+
static/data/bibliography.json
76+
static/data/bibItems
77+
content/en/history/bibliography
78+
key: bib-${{ fromJson(steps.zoteroVersion.outputs.headers).last-modified-version }}
8179

8280
# ----------------------------------------------------------------------------
8381
# Build the website. This job is conditional, we will always run it on a
@@ -94,31 +92,23 @@ jobs:
9492
fetch-depth: 0
9593

9694
- name: Cache Zotero Bibliography
97-
id: cache-zotero-bib
95+
id: cache-bib
9896
uses: actions/cache@v4
99-
env:
100-
cache-name: cache-zotero_bib
10197
with:
102-
path: ~/data
103-
key: ${{ needs.check.outputs.zoteroVersion }}
104-
restore-keys: |
105-
${{ needs.check.outputs.zoteroVersion }}
98+
path: |
99+
static/data/bibliography.json
100+
static/data/bibItems
101+
content/en/history/bibliography
102+
key: bib-${{ needs.check.outputs.zoteroVersion }}
106103

107104
- name: Install Bibliography
108-
env:
109-
CACHE_HIT: ${{ steps.cache-zotero-bib.outputs.cache-hit }}
105+
if: steps.cache-bib.outputs.cache-hit != 'true'
110106
run: |
111-
if [[ "$CACHE_HIT" == 'true' ]]; then
112-
echo "Use Cache"
113-
sudo cp --recursive ~/data ${GITHUB_WORKSPACE}/static
114-
ls -la ${GITHUB_WORKSPACE}/static/data
115-
else
116107
echo "Retrieve bibliography"
117108
cd scripts
118109
chmod +x ./update_bibliography.sh
110+
chmod +x ./bibSplit.pl
119111
./update_bibliography.sh
120-
sudo cp --recursive ${GITHUB_WORKSPACE}/static/data ~/data
121-
fi
122112
123113
# Install Hugo Extended
124114
#
@@ -162,4 +152,4 @@ jobs:
162152
- name: Deploy to GitHub Pages
163153
id: deployment
164154
uses: actions/deploy-pages@v4
165-
155+

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ _gen/
1818
.hugo_build.lock
1919
.idea
2020
data/bibliography.json
21+
static/data/bibliography.json
22+
static/data/bibItems/
23+
/docs
24+
/scripts/*.json
25+
/content/en/history/bibliography/**
26+
!/content/en/history/bibliography/_index.md

config/_default/hugo.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ defaultContentLanguageInSubdir: false
3535
enableMissingTranslationPlaceholders: true
3636

3737
# Disable rendering of the specified page kinds
38-
disableKinds:
39-
- taxonomy
40-
- term
38+
#disableKinds:
39+
# - term
40+
# Note terms are needed for taxonomies to work
4141

4242
outputs:
4343
home:

config/_default/languages.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
# See: https://gohugo.io/content-management/multilingual/
66
#
77
en:
8-
languageName: English"
8+
languageName: English
9+
languageCode: en-us
910
# Weight used for sorting.
1011
weight: 1
1112
contentDir: content/en
1213
params:
13-
description: "Dedicated to restoring and preserving the Interlisp experience"
14+
description: "Dedicated to restoring and preserving the Interlisp experience"
15+
16+
# Languages
17+
# Create a section for each of your site's languages.
18+
# Documentation: https://docs.hugoblox.com/reference/language/

config/_default/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
- path: "github.com/google/docsy"
99
disable: false
1010
- path: "github.com/google/docsy/dependencies"
11-
disable: false
11+
disable: false

config/_default/params.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,27 @@ links:
108108
# icon: "fa fa-envelope"
109109
# desc: "Discuss development issues around the project"
110110

111-
taxonomies:
111+
taxonomy:
112+
taxonomyCloud:
113+
- authors
114+
taxonomyCloudTitle:
115+
- Authors
116+
taxonomyPageHeader:
117+
- authors
118+
- item_type
119+
120+
#related:
121+
# threshold: 80
122+
# includeNewer: true
123+
# toLower: true
124+
# indices:
125+
# - name: item_type
126+
# weight: 5
127+
# - name: tags
128+
# weight: 100
129+
# - name: categories
130+
# weight: 70
131+
112132
# Nothing defined
113133

114134
# User Interface Configuration options
@@ -154,7 +174,7 @@ ui:
154174
sidebar_cache_limit: 100
155175

156176
# We have almost 200 attributes; don't truncate the sidebar to max 50 contents.
157-
sidebar_menu_truncate: 1000
177+
sidebar_menu_truncate: 0
158178

159179
# Set to true to disable breadcrumb navigation.
160180
breadcrumb_disable: false
@@ -167,3 +187,4 @@ ui:
167187
# Identify the custom css files
168188
custom_css:
169189
- "css/custom.css"
190+

config/_default/permalinks.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@
66
#
77
# see: https://gohugo.io/content-management/urls/#permalinks
88
#
9-
blog: /:section/:year/:month/:day/:slug/
9+
blog: '/:section/:year/:month/:day/:slug/'
10+
11+
authors: '/author/:slug/'
12+
tags: '/tag/:slug/'
13+
categories: '/category/:slug/'
14+
publication_types: '/publication-type/:slug/'

config/_default/services.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
rss:
2+
limit: -1
3+
title: "Interlisp.org RSS Feed"
4+
description: "The latest news from Interlisp.org"
5+
link: "https://interlisp.org"

config/_default/taxonomies.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tag: tags
2+
category: categories
3+
author: authors
4+
item_type: item_type
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
---
22
title: Bibliography
3+
heading: Interlisp Bibliography
4+
type: bibliography
5+
cascade:
6+
type: bibliography
37
weight: 5
4-
type: docs
58
aliases:
69
- /bibliography/
710

811
---
9-
10-
## Interlisp Bibliography
11-
1212
(This bibliography is kept in sync with our [Zotero](https://www.zotero.org/) collection [Library](https://www.zotero.org/groups/2914042/interlisp/library).
13-
14-
{{< bibTable >}}

0 commit comments

Comments
 (0)