Safari to Rich Text link

Anyone have automation suggestions using only macOS standard apps (Automator, AppleScript) and/or TextExpander to create a rich text link from Safari? I would like to have the page name as the text and the URL as the link.

I am trying to find a solution on a managed system.

This forum post shares an AppleScript link that does this (then the OP asks about doing it in TextExpander):