Skip to content

Conversation

@stumbo
Copy link
Member

@stumbo stumbo commented Aug 24, 2025

An initial Hugo script to create a page listing all the bibliographical entries (here expected to be in a folder content/en/publications)

This work is currently live on the staging site at publications.

This is a step back from some of my initial ideas, but is easier to implement and provides a framework discussion and for adding additional functionality.

While the current implementation uses content/en/publications as the location of the bibliography entries my end goal is to replace the existing bibliography page.

I purposely kept this PR separate from Matt's work, #279, to isolate any changes.

Next steps:

  • Create the individual page layout. This will be a more extensive presentation of the information within the Zotero bibliographic entry. Links to urls to view the article will be provided
  • Creation of css to style the listing and individual pages
  • Integration with the work Matt has done to create individual markdown files.
    • I'm currently generating the individual pages with an R script I had laying around. It's ugly put gives me full control over the content. Nice for debugging.
    • Merge into Matt's work and leverage his work on creating individual md files
  • Along those lines, handling 404 errors. If a bibliographic entry disappears or is changed, do we want a custom 404 page separate from the Interlisp.org page?
  • Longer term, version 2?, we can focus on sorting and filtering of entries, leveraging keywords in the bibliographic entries.
image

MattHeffron and others added 9 commits April 15, 2025 11:00
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
This now creates the files but has some difficulties.
The main Bibliography page hasn't been changed.
Crude listing generated in /pulications folder.
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.
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.
@pamoroso
Copy link
Contributor

The page looks clean. But what about turning the entries from bullet items to just paragraphs with the same formatting (i.e. everything except the bullet)? This would make the entries closer to the left margin. And over 600 bullets may not improve scannability much.

What do others think?

@stumbo
Copy link
Member Author

stumbo commented Sep 6, 2025

The page looks clean. But what about turning the entries from bullet items to just paragraphs with the same formatting (i.e. everything except the bullet)? This would make the entries closer to the left margin. And over 600 bullets may not improve scannability much.

What do others think?

I agree - and this is where work on the css will come in. For now, I just went with vanilla html and didn't spend time worrying about the formatting.

@masinter
Copy link
Member

404 -- a custom 404 per se isn't necessary and might be difficult. As long as there's a 404?

A date YYYY-01-01 I suspect is how it is printing dates that were just known YYYY. It would be better to not lose the distinction between 'month and day unknown' or 'month known, but day not known' and 'date really is january 01' or 'date really is YYYY-MM'

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.
@stumbo
Copy link
Member Author

stumbo commented Oct 3, 2025

I just pushed a commit that makes several major updates. From the commit note:

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.

The updates are live on the staging site. Here's a preview of what the interface currently looks like:
image

Entries are currently sorted alphanumerically by title.

Copy link
Contributor

@hjellinek hjellinek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks marvelous. I see two problems to fix before going live, though:

First, the entries do not link to the relevant entry on the Zotero website. That's what I would assume would happen upon clicking the "Read more" link, but that only takes you to the abstract. How about having two links: one a direct link to the item in Zotero, ("View in bibliography") and another that takes you to the abstract (the current behavior) labeled "View abstract"? "Read more" is too vague.

A big motivation behind this work, as you know, is to get this page, and by extension Interlisp.org, indexed by search engines. So from a SEO perspective, placing the abstract on the page without linking out to it will provide better grist for the indexing mill. (If the abstract is too long, extract the first paragraph or so.)

Second, the plethora of HTML character entities that peek through into the rendered text. (They do not appear in the linked abstract pages.)

For instance, look at the text snippet for A clipping divider:

When compared with a drawing on paper, the pictures presented by today&rsquo;s computer display

Also in Ambitious evaluation: a new reading of an old issue:

Much has been written about Lazy Evaluation in Lisp&mdash;less about the other end of the spectrum&mdash;Ambitious Evaluation.

There are many other instances of unrendered character entities in the text. On the staging site, search for "&" and see them.

stumbo and others added 8 commits October 8, 2025 21:31
The Read Me link now points to the Zotero entry for
each item.
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.
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.
                                                         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.
Build out parsing of json to get needed items
and putting the items into the generated pages.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants