-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
nbsp spaces missing in heading slug values #12970
Comments
We use Plus, I would argue that adding emojis and Unicode characters to an |
Thanks for the review. Discussions are being held on discord?
On side note, I don't think using unicode chars eg non breaking spaces should be against SEO, as they are a part of well or properly formatted text, numbers, SI values, handling text orphans/widows etc. The emoji example I took from In any case, yes, this would be a breaking change then. If this feature should matter, maybe a solution would be to have a configuration option to enable kebab-case slugs. Thanks again! |
Discussions happen in this repository: https://github.com/withastro/roadmap |
Ah, right, thanks, will look onto it! |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
As shown in stackblitz example, non-breaking spaces in heading text aren't recognized as spaces in heading ID slug — or slug-like — values.
Example:
## A fox jumped over a fence
will have an ID value
afox-jumped-over-afence
.More over, the ID value does not necessary follow kebab-case.
Example:
## 😄 A bird 😄 😄 is a word 😄 😄 😄
will have an
-abird---is-aword--
ID value.What's the expected result?
For every use case, the generated ID value could be in "SEO-friendly" kebab-case, eg
lorem-ipsum-dolor-sit-amet
.This would be more human/machine readable if need-be, and potentially have a more persistent link value.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-umpwjgrj?file=src%2Fdata%2Fblog%2Fpost-1.md
Participation
The text was updated successfully, but these errors were encountered: