Repository navigation
Name every person photo after the person - #200
Conversation
ber2
left a comment
There was a problem hiding this comment.
I found a couple of duplicated files; I ignore if removing the duplication is part of the scope of this PR; leaving the note and approving changes.
The photo file names had grown three conventions at once: 102 used hyphens, 13 used underscores, and 17 were a first name with no surname, which is how `david.jpeg` and `angel.jpg` came to stand for two of the people who appear on the most pages. The extension was a fourth: 67 `.jpg`, 47 `.jpeg` and 18 `.png`, with no relation to the format inside the file. Each photo is now named after the person it shows, as the lower case of their `name` field with the accents folded and the spaces hyphenated, and the extension matches the format the file really is. 75 files moved, and the 77 person records that referenced them were updated with them. Two files belonged to nobody and are gone: `alberto-camara.jpeg`, superseded by the one the record actually points at, and `elisabeth-ortega-carrasco.png`, a second copy of a photo already there as `.jpg`. Nine person records had CRLF line endings, invisible until something compares text and then not invisible at all. All of `content/` is now LF. One pair is left alone on purpose. `alvaro_duran.jpg` and `alvaro-duran-barata.jpeg` are two photos of the same person under two person records, `alvaro_duran` and `alvaro-duran-barata`, so naming both after him would collide. That is a duplicate record rather than a naming problem, and merging two records means deciding which history survives, which belongs with the rest of the people work and not here. No URL changes. Hugo processes these files into fingerprinted names, so the name on disk is never the name on the site.
|
Closing the loop on this one. The duplicates are gone. Natalia Padilla went first, merged into one file with the role set per page entry instead of a second record. Daniel Mesejo and Alvaro Duran Barata are merged now: one card each, the later file kept, and every field of the older one checked before it was dropped. Two links did not survive that check and are not carried over: Mesejo's StackOverflow Developer Story, a feature StackOverflow withdrew in 2022 whose URL still answers 200 with an empty page, and alvaroduran.com, which answers the GitHub Pages 404. Then I swept all 135 person files for a repeated name, GitHub account, LinkedIn profile, X account, personal site, or photo. Those two pairs were the only ones. While I was in there, 43 of the files took the name of the person in them. Some were a first name alone, which is a name the directory cannot hold twice: david.md, jordi.md, alberto.md. Some were a handle: lpmayos.md, ifosch.md, rberenguel.md. Some used an underscore where the rest of the directory uses a hyphen, and some carried one surname of two. The id moved with the file name, because bin/check-content requires the two to match, and the 93 references to those ids across 11 event and association pages moved with the id. No alias was needed and none was added: config.toml has cascaded render = "never" over content/people since #201, so a person file builds no page and has no URL to break. All of it is in #208, so it is reviewable in one go rather than scattered. Thanks for catching them. |
Stacked on #199. Mechanical: the only judgement in it is the naming rule, and the rest is a script applying it.
The photo file names had grown three conventions at once: 102 used hyphens, 13 used underscores, and 17 were a first name with no surname, which is how
david.jpegandangel.jpgcame to stand for two of the people who appear on the most pages. The extension was a fourth convention: 67.jpg, 47.jpegand 18.png, with no relation to the format inside the file.Each photo is now named after the person it shows: the lower case of their
namefield, accents folded, spaces hyphenated, and the extension matching the format the file really is. 75 files moved and the 77 person records that referenced them moved with them..jpeggoes from 47 files to 1.Three things found while doing it
Two files belonged to nobody.
alberto-camara.jpeg, superseded by the one the record actually points at, andelisabeth-ortega-carrasco.png, a second copy of a photo already present as.jpg. Both deleted.Nine person records had CRLF line endings. Invisible until something compares text, and then not invisible at all: they broke a check of mine while writing this. All of
content/is now LF.One pair is left alone on purpose.
alvaro_duran.jpgandalvaro-duran-barata.jpegare two photos of the same person under two person records, so naming both after him would collide. That is a duplicate record rather than a naming problem, and merging two records means deciding which history survives, which belongs with the rest of the people work and not here.No URL changes
Hugo processes these files into fingerprinted names, so the name on disk is never the name on the site. Verified: the organizers page loads all 22 card photos with no 4xx and none of them non-square.