Skip to content

Initial attempt to create individual pages for the Bibliography entries. #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MattHeffron
Copy link
Contributor

@MattHeffron MattHeffron commented Apr 15, 2025

This is DRAFT at this time.

  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

It looks like hugo is correctly trying to process the file, but it hasn't gotten the .params.bibItem object correct.

I also tried capitalizing .Params in the shortcodes/bibItem.html file, but that gave a different error:
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 bibItem in type interface {}

The "params": in the generated .md file is lowercase as that is how it is shown in the Hugo documentation for Front Matter.

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
@MattHeffron MattHeffron added the enhancement New feature or request label Apr 15, 2025
@MattHeffron MattHeffron self-assigned this Apr 15, 2025
@MattHeffron
Copy link
Contributor Author

This uncovered an additional error in update_bibliography.sh in that it doesn't delete children of items that Zotero has marked to delete. (Maybe Zotero should mark such children items for deletion as well?) There is one such entry at this point and this comment is a reminder to me to fix that as well.

@MattHeffron MattHeffron linked an issue Apr 15, 2025 that may be closed by this pull request
@MattHeffron
Copy link
Contributor Author

I just remembered that @stumbo (our Hugo expert) is off-the-grid for some time. Is anyone else competent in Hugo to help figure this out?

This now creates the files but has some difficulties.
The main Bibliography page hasn't been changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Landing pages for bibliography entries
1 participant