Skip to content

Auto-link URLs in /mf2/ posts

Jamie Tanna requested to merge article/hugo-autolink-urls into master

Although /mf2/ posts can contain URLs, it wasn't up until this point that we rendered them as HTML links.

This would hamper user experience for both human and computer readers as it would remove some of the semanticness of the relevance of there being a link there, as well as make it harder to follow the links through.

To get this rendering, I've adapted 0 and 1 to produce a regex which converts the plain URL to an HTML link

Additionally, convert any existing links that would break as part of this change, as they're rendered next to punctuation that is valid in a URL.

Merge request reports