Blot

URL-ifying Titles

I noticed that Blot replaces apostrophes with dashes when converting a title to a URL-ready slug, but only when they’re singular. For example,

Apple’s Striking Short Film Ahead of International Day of People With Disabilities → https://heydingus.net/blog/2022/12/apple-s-striking-short-film-ahead-of-international-day-of-people-with-disabilities

vs

‘All Consuming’ Podcast is Back → https://heydingus.net/blog/2022/12/all-consuming-podcast-is-back

Would you consider making it so singular apostrophes are also ignored, as it would make the URLs more readable?

Asked 4 years ago Edit
12 replies

Yes, I think this is a good change, I'll add it to my list and follow up here when it's ready

4 years ago Edit

Thank you!

4 years ago Edit

The URL generator has been improved, and your post is at a new URL. Thanks for the suggestion!

4 years ago Edit

Hey, thought you'd want to know that I noticed the same issue with a post I published tonight: https://heydingus.net/blog/2023/3/don-t-be-a-knee-jerk

4 years ago Edit

Good find, I added another rule to handle n't to the URL slug code. I rebuilt your post as well. The reason I don't just nuke all apostrophes is because there are some cases like l'état which should become l-etat.

4 years ago Edit

Good to know!

4 years ago Edit

Good catch, this should now be fixed! I added a few more rules as well, thanks again:

https://github.com/davidmerfield/Blot/commit/b23ab58a61e70ac0c6a331b797f584fc8e9944bd

4 years ago Edit

Thanks!

(P.S. If I could specify just the slug without having to recreate the whole path, I'd be able to solve some of these without bugging you. 😉)

4 years ago Edit

Noted! I will make that possible soon

4 years ago Edit

That should now be fixed – thanks again

3 years ago Edit

Your reply