thegetty / quire

A multi-package repository for the Quire multiformat publishing framework
https://quire.getty.edu/
BSD 3-Clause "New" or "Revised" License
93 stars 12 forks source link

`{% contributors context=publicationContributors %}` is causing contributors created with `first_name` `last_name` in page YAML to be overwritten #853

Open Erin-Cecele opened 11 months ago

Erin-Cecele commented 11 months ago

Before proceeding, make sure there isn’t an existing issue for this bug.

Expected Behavior

When using the {% contributors %} shortcode with context=publicationContributors all the contributors mentioned in page YAML and publication.yaml should be listed on the page with the shortcode. Under each contributor it should list the essays written by each contributor.

Actual Behavior

When using the {% contributors %} shortcode with context=publicationContributors the shortcode is looking for contributors listed in publication.yaml as well as any listed in the page YAML of individual markdown pages. But for those listed in page YAML, the data for each one is overriding the last, except for the links to papers. So, you end up with the info of the last contributor to be listed in the book, but with a list of every paper that all the other overridden contributors were part of.

Steps to Reproduce

  1. Create a new project
  2. Add two different contributors to the page YAML of two different .md files using the first_name and last_name fields.
  3. Look at the Contributors page of project and you will see only one of the two contributors listed and both essays listed under that one contributor

Version Numbers

[Project] quire-cli 1.0.0-rc.10 quire-11ty 1.0.0-rc.14 starter /Users/edunigan/GitHub/quire-starter-minimal@2.6.0 [System] quire-cli 1.0.0-rc.10 node v18.16.0 npm 9.5.1 os Darwin 21.6.0

Web Browser

Chrome Version 117.0.5938.88 (Official Build) (x86_64)

Relevant Terminal/Shell Output

N/A

Supporting Information

There are two separate Forewords in this project with two separate contributors, but only one contributor is listed with both Forewords.

Screen Shot 2023-10-06 at 1 55 41 PM
Erin-Cecele commented 11 months ago

This is similar to issue #847 but rather than the issue being with context=publicationContributors it's context=pageContributors.

Erin-Cecele commented 8 months ago

When I refer to "contributors mentioned/listed in the page YAML" I am specifically referring to the contributors added with:

contributors
  - first_name: 
    last_name: 

This is separate from contributors listed in the publication.yaml and added via an id in the page YAML, which this issue does not appear to affect.