The link appears that way when a URL or a link is pasted/used as the title of the topic. So just paste a URL in the title area:
And Discourse picks the title and creates a link.