Skip to content
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

Template does not work for representative's name with apostrophe #246

Closed
Sakrecoer opened this issue Mar 5, 2025 · 2 comments
Closed

Template does not work for representative's name with apostrophe #246

Sakrecoer opened this issue Mar 5, 2025 · 2 comments

Comments

@Sakrecoer
Copy link

Sakrecoer commented Mar 5, 2025

The way the current template fetches images for member pages (single.html) is not working correctly when a representative's name has a special character (like an apostrophe: ').

To select an image for the representative on a member page, the current implementation matches the name for the representative introduced in the member.yaml file , against the image present in /assets/images/members/<member_name>/. If a representative's name contains an apostrophe, this matching fails.

For reference, see this member.yaml file: https://github.com/ForkbombEu/pkic.org/blob/ffa356906804884d31b3f34c578f2bbc594ae794/data/members/forkbomb.yaml#L50

matched against a jpg here: https://github.com/ForkbombEu/pkic.org/tree/main/assets/images/members/forkbomb

Spelling the name wrong (Dintino instead of D'Intino) in both the member.yaml file and the jpg's file-name renders the image correctly on the page.

@Sakrecoer Sakrecoer changed the title Template does not work for names with apostrophe Template does not work for representative's name with apostrophe Mar 5, 2025
@vanbroup
Copy link
Contributor

vanbroup commented Mar 5, 2025

You can add an id: first-lastname to that representative where the id will be used to match the photo.

@Sakrecoer
Copy link
Author

Many thanks @vanbroup !
Closing the issue. Have a fantastic weekend!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants