Skip to content

Rewrite Twitter profile URLs in Micropub

Jamie Tanna requested to merge feature/twitter-url-rewrite into develop

I've fairly recently added support within my site to replace URLs to Twitter profiles with @-username, so when the note was syndicated to Twitter it would be correct.

However, because this is within the site's theme it depends completely on what is being used to render my site. This is less than ideal, and means if I were to move themes in the future, it would need to be reimplemented.

Instead, we can set this functionality to be set up in the Micropub endpoint, so any content created from now, will have this built in to its source data, at the cost of it being static from that point.

This is more important since finding on Thursday with 0 that the regex I was using wasn't actually working (in this case, it didn't match the URL at the end of the line) so it was better to get a better regex in place.

Closes #130 (closed).

Merge request reports