DIAGNijmegen / website-content

This repository stores all the content for the diag websites.
MIT License
5 stars 74 forks source link

Change how publications associate with a project #484

Open keelinm opened 1 year ago

keelinm commented 1 year ago

Currently when a project page is created, the publications (bibkeys) associated with that project must be added to that project page, and members have to remember whenever they have a new publication to (not only add it to diag.bib, but) separately add it to the project page. Ideally the project should have a project-tag which could be mentioned in the diag.bib entry. The publications list for the project would then update automatically when the diag.bib had a related publication added.

One issue is that retrospective fixes would be needed. I think there are 2 ways to handle this: 1) We allow projects/publications to be connected both the old way and the new way (so a bibkey in the project page, or a project-tag in the diag.bib) 2) We make a script to go over the project pages and add the bibkeys mentioned in them into the related diag.bib entries

JoeySpronck commented 1 year ago

Approach to solve:

1) in bibparser: make a function that returns a list of all project names 2) in bibparser: make dict with key project names and value list of related bibkeys/publications --> save as json 3) in bibloader (in plugins): load this json and make a new variable that can be accessed via pelican (use signals: generator function) 4) in the projects-single template: access the pelican variable and fill the bibkeys in the project template