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/docsy@v0.10.0/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/docsy@v0.10.0/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 9 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.
MattHeffron and others added 4 commits October 25, 2025 21:03
A hack for bulleted list in Abstracts.
Some rearranging for consistency between the list and single views.
Other tweaks for my preferences.
Add bibliographical support for item_type (the type of
bibliographic entry) and author.

Provide support for filtering bibliographic list by both
types of tags.
@MattHeffron
Copy link
Contributor

MattHeffron commented Oct 27, 2025

Looking good, but:

  • I do not get vertical scroll bars for either the "main" or "Authors" panes. (Chrome on Windows 11.)
  • In list.html the handling of abstract looks like what I had, but for "Special Files on <Test>ARs>" (key: 7KUMIRNC) it is corrupted. It's correct in the title.
    • It appears this may be related to some other condition?? The abstract shown is corrupted as noted above, but it is correct for "SEdit test report", key: RJLLRQDR). However, the <word>, that looks like an HTML tag is removed in both cases on the single page for the items.
  • bibSplit.pl isn't handling extended characters in author names, e.g., "Emanuelson, Pär" (in "On compiling embedded languages in LISP" key: ALMXAIQC; and other items). They're correct in the JSON. (Presumably, there are other places where these characters would be an issue.) They're corrupted in the .md files, so it isn't a Hugo problem.

I am testing locally with hugo server -e development and I'm running hugo version 0.152.2.
(The problem that I previously had mentioned about it failing to run as server, was due to a bug in version 0.152.0, which snap had updated to! I'm not using snap for this now.)

… debugging changes.

Included usage information.
The previous behavior (no command line options) is unchanged.
(No modification to invocation required.)
@MattHeffron
Copy link
Contributor

  • I do not get vertical scroll bars for either the "main" or "Authors" panes. (Chrome on Windows 11.)

Per discussion at meeting 10/29 -- this is a Chrome issue, not restricted to Windows. (I.e., scrollbars display correctly in Firefox.)

@nbriggs
Copy link
Contributor

nbriggs commented Oct 30, 2025

Not sure if this should be a separate issue -- in the medley timeline view on the staging site, there's oddly inconsistent indentation in the decadal section headers, notably for the 1980s:
Screenshot 2025-10-30 at 15 23 24

Clean out some old files js & scss from earlier bibliography work.
@stumbo stumbo marked this pull request as ready for review October 31, 2025 11:59
@stumbo stumbo requested a review from hjellinek October 31, 2025 12:00
@stumbo
Copy link
Member Author

stumbo commented Oct 31, 2025

This is ready to merge. What is currently running on the staging site accurately reflects this code, the only material difference is the staging site has a flag setting it to staging. Beyond that there are no differences.

Not sure if this should be a separate issue -- in the medley timeline view on the staging site, there's oddly inconsistent indentation in the decadal section headers, notably for the 1980s: Screenshot 2025-10-30 at 15 23 24

This is a separate issue and unrelated to the bibliography work. I'll open a separate issue for it.

@hjellinek
Copy link
Contributor

@stumbo, were you planning to replace the "Cite: placeholder for link to retrieve citation from Zotero." text before releasing this?

@hjellinek
Copy link
Contributor

Also, the bug where you click on an author's name (e.g., "Bates, Raymond L."), then click "All Authors" and find yourself on an empty "Authors" page?

@MattHeffron
Copy link
Contributor

I believe that I have a fix for the problem I mentioned:

  • bibSplit.pl isn't handling extended characters in author names, e.g., "Emanuelson, Pär" (in "On compiling embedded languages in LISP" key: ALMXAIQC; and other items). They're correct in the JSON. (Presumably, there are other places where these characters would be an issue.) They're corrupted in the .md files, so it isn't a Hugo problem.

Should that be a separate issue after accepting/merging the bs1_bibliography branch, should I make a change here now, or on the bs2_bibliography branch? (bs2_bibliography doesn't have a PR yet)
I noticed that there are other differences between these 2 branches, e.g., hugo version.

@stumbo
Copy link
Member Author

stumbo commented Oct 31, 2025

@stumbo, were you planning to replace the "Cite: placeholder for link to retrieve citation from Zotero." text before releasing this?

Good catch, I read right over that multiple times. I'm removing it for now. Something to circle back around and add later. It's been removed.

@stumbo
Copy link
Member Author

stumbo commented Oct 31, 2025

Also, the bug where you click on an author's name (e.g., "Bates, Raymond L."), then click "All Authors" and find yourself on an empty "Authors" page?

I was going to fix this as a fast follow. I have some ideas on what's causing the problem. But, it'll take a little time to figure it out.

@stumbo
Copy link
Member Author

stumbo commented Oct 31, 2025

I believe that I have a fix for the problem I mentioned:
...
Should that be a separate issue after accepting/merging the bs1_bibliography branch, should I make a change here now, or on the bs2_bibliography branch? (bs2_bibliography doesn't have a PR yet) I noticed that there are other differences between these 2 branches, e.g., hugo version.

Let's fix it as a separate PR. And, no don't use bs2_bibliography that as you rightly noticed isn't what we're releasing. It's a different approach I took in attempting to get by some deployment issues. It's more of a historical artifact right now.

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.

7 participants