Log in Sign up

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?


a year ago, 12 replies   request   added   Edit question

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

Answered 2 years ago · Edit answer

Thank you!

Answered 2 years ago · Edit answer

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

Answered 2 years ago · Edit answer

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

Answered 2 years ago · Edit answer

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.

Answered 2 years ago · Edit answer

Good to know!

Answered 2 years ago · Edit answer

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

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

Answered 2 years ago · Edit answer

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. 😉)

Answered 2 years ago · Edit answer

Noted! I will make that possible soon

Answered 2 years ago · Edit answer

That should now be fixed – thanks again

Answered a year ago · Edit answer