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

Prototype page permalinks should allow transliteration #248

Closed
stevegeek opened this issue Feb 17, 2021 · 2 comments
Closed

Prototype page permalinks should allow transliteration #248

stevegeek opened this issue Feb 17, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@stevegeek
Copy link

As per chat:

For permalinks in prototype generated pages, think its not possible to specify the mode for the slugify of term? (would like the slug to be in 'latin' mode to remove accented chars). Tried something like
prototype:

term: my_term
    collection: notes
permalink: !ruby/string:Rb |
    "/notes/#{Utils.slugify(page.data["my_term"], mode: "latin")}/"

but no luck... any guidance would be appreciated! Thanks!

Jared White
I'm surprised it's not doing that already. Feel free to file an issue and I'll look into that soon.

Bridgetown Version:

0.19.3

To Reproduce

Prototype page where term contains an accented char

Current behavior

Accented char appears in URL

Expected behavior

Optionally I can opt for ASCII only URIs (as per spec tho browsers support unicode in URIs anyway)

@stevegeek stevegeek added the bug Something isn't working label Feb 17, 2021
@jaredcwhite
Copy link
Member

This will be solvable by #243 — prototype pages will inherit a new slugify_mode site configuration which defaults to pretty but if you change it to latin it will fix your problem.

@jaredcwhite
Copy link
Member

Resolved by v0.20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants