Your sites Log in Sign up Menu

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?


9 months ago, 12 replies   request   added   Improve this 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 a year ago · Improve this answer

Thank you!

Answered a year ago · Improve this answer

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

Answered a year ago · Improve this 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 a year ago · Improve this 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 a year ago · Improve this answer

Good to know!

Answered a year ago · Improve this 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 a year ago · Improve this 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 a year ago · Improve this answer

Noted! I will make that possible soon

Answered a year ago · Improve this answer

That should now be fixed – thanks again

Answered 9 months ago · Improve this answer