quire
quire copied to clipboard
`sort_as` not working with contributor ids in page YAML
Before proceeding, make sure there isn’t an existing issue for this bug.
- [X] I have searched the existing issues and determined this is a new bug.
Expected Behavior
When you add sort_as
under contributor id
s in the page YAML it should sort them according to the desired order.
Actual Behavior
Adding sort_as
under contributor id
s in the page YAML has no effect on the ordering.
Steps to Reproduce
- Start a new Quire project
- Add contributors to the
publication.yaml
- List contributor
id
s in theessay.md
page YAML - Add
sort_as
to the contributors to override the alphabetical ordering and check to see if it changed the ordering
Version Numbers
[Project] quire-cli 1.0.0-rc.10 quire-11ty 1.0.0-rc.14 starter /Users/edunigan/GitHub/[email protected] [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
This came up with Inventories and Surveys: https://github.com/thegetty/inventories-and-surveys/issues/13 and Bronze Guidelines: https://github.com/thegetty/bronze-guidelines/issues/64
The fix I found that worked in the Bronze Guidelines book was a single line adding the sort_as value in the getContributor
filter:
// Add local sort_as value if one is provided
item.sort_as ? contributor.sort_as = item.sort_as : ''