Hello, everytime I create a post with a link, I can see two links on Twitter and Linkedin. I don’t have any issues seeing my link changed with lnkd.in or twd.com but it’s very annoying to see two links. Is anything I can do?.
Hi Claudio, I see what you mean. I tested it myself. I think the issue is that Twitter turns URLs into links and they take the embedded link and make it visible as a link as well. That’s an issue when a name is also a URL, and I don’t see a way to avoid it, unless you intentionally break the name with an extra space before or after the “dot.” If I cross-post to Twitter and the post has a markdown link applied to some text that doesn’t include a URL, it works as expected, with the link appearing after the text. PS. Welcome to Micro.blog!
Thank you so much Jean, I was able to crosspost the way I wanted on Twitter but it didn’t work for LinkedIn. Is any way to make the post compatible for both platforms?
LinkedIn wraps all external links into their shortener, that’s not an issue. But it does seem that you don’t have any images or anything that might convince it to turn it into a card in the first place.
The same with Twitter really, which also has rich card previews.
I think that’s a more viable option, the alternative is that LinkedIn just doesn’t fully process the links posted this way, but I doubt it (it still wrapped it).
I do think Micro.blog would benefit a lot from having a default wide image that’s applied to pages that don’t have an image in their content. You can replace Hugo’s default template for OpenGraph/Twitter and use a construction like this:
<meta name='twitter:card' content="summary_large_image"/>
{{ with $.Params.image }}
<meta name='twitter:image' content="{{ . | absURL }}"/>
{{ else }}
{{ with $.Site.Params.image }}
<meta name='twitter:image'content="{{ . | absURL }}"/>
{{ end }}{{ end }}