jlelse's Blog

Thoughts, stories and ideas

A new "Share" option

Published on in 💬 Micro
Short link: https://b.jlel.se/s/12e
Share online  Translate 
⚠️ This entry is already over one year old. It may no longer be up to date. Opinions may have changed.

Thanks to AddToAny, there’s now a “Share” option on my blog. If you find an article share-worthy, simply click on that link and select how to share this article. It should be pretty simple.

In Hugo I use the following line of code to create a share link:

<a href="https://www.addtoany.com/share#url={{ .Permalink }}{{ with .Title }}&title={{ . }}{{ end }}" target="_blank" rel="nofollow noopener">{{ T "share" }}</a>

{{ T "share" }} is a translation string, but if you don’t care about translations, simply replace this with your preferred string.

Tags:

Jan-Lukas Else
Interactions & Comments