drand / website

Drand webpage, docs and blog 📚
https://drand.love
Other
3 stars 13 forks source link

Add a "Tweet it" button to our blog entries #142

Closed AnomalRoil closed 1 year ago

AnomalRoil commented 2 years ago

Could we add a "Tweet it" button to our blog entries?

This should be as easy as:

<a class="twitter-share-button"
  href="https://twitter.com/intent/tweet?text=Checkout%20this%20new%20drand%20blog%20post%20about%20$(name of blog post):%20$(url of blog post)">Tweet it</a>

But IDK exactly how to get the URL and the Name into there.

johnnymatthews commented 2 years ago

Yeah this is doable. We'd have to edit docs/.vuepress/theme/components/PostList.vue and use the page.title and page.path variables, somewhere.

yiannisbot commented 2 years ago

If you could look into that when you get a moment @johnnymatthews that would be great. Obviously not an urgent ask :)

ErickWa commented 1 year ago

This looks promising:

https://codingnconcepts.com/hugo/social-icons-hugo/

CluEleSsUK commented 1 year ago

Does anyone actually use such ‘tweet it’ buttons!?

ErickWa commented 1 year ago

Does anyone actually use such ‘tweet it’ buttons!?

I know this is something that you and AnomalRoil would likely never do, but I promise that there are millions of people who find clicking on these buttons to be a very addicting pastime. It will also help us increase community engagement numbers, which we'll be tracking with Google Analytics 4 pretty soon! :)

johnnymatthews commented 1 year ago

I threw PR #182 together, and I'm pretty sure it'll work. But I don't have a Twitter account (I know...) to test it with.

There's a preview here: https://bafybeigunxpds6kwqcgk4fvxrhkii6jcgfxxlcnlp64obicvfmvdxvtwuy.on.fleek.co/blog/2023/06/06/announcing-the-drand-code-walkthroughs/

Can someone with a Twitter account try clicking on the Tweet it link at the top and see what it does.