A Liquid tag for Jekyll that allows for the embedding of suggested tweets via Twitter’s Web Intents API.
(John did all wranglin’ of Rich’s code. I just bought him pizza and told him what I wanted.)
This plugin is based upon Rich Hollis’s Twitter Web Intents Ruby Gem.
Please note that you’ll need to install the Twitter Web Intents gem as it’s required.
{% suggested_tweet %}
tag to your post or template.The following parameters may be set globally in _config.yml or on a per page basis in the YAML front-matter. Parameters set in the YAML front-matter take precedence over those set in _config.yml. Note that all parameters are optional.
suggested_tweet:
url: 'http://davidensinger.com/'
via: 'davidensinger'
text: 'Hello world'
in_reply_to: 331434728957833218
hashtags: ['Jekyll', 'Twitter']
related: ['davidensinger', 'richhollis', '2john4tv']
{% suggested_tweet %}
https://twitter.com/intent/tweet?hashtags=Jekyll,Twitter&in_reply_to=331434728957833218&related=davidensinger,richhollis,2john4tv&text=Hello+world&url=http%3A%2F%2Fdavidensinger.com&via=davidensinger
As an example we’ll use the text parameter:
{{ site.suggested_tweet.text }}
{{ page.suggested_tweet.text }}
hashtags
and related
.Please do!