Skip to content

Commit

Permalink
Added support for configuring the twitter support via the _config.yml…
Browse files Browse the repository at this point in the history
… file.
  • Loading branch information
michaelmeasures committed Sep 19, 2016
1 parent 42a7abe commit 639e299
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
6 changes: 4 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ github_editme_path: /edit/gh-pages/
# if you're using Github, provide the basepath to the branch you've created for reviews, following the sample here. if not, leave this value blank.

#disqus: true

disqus_shortname: nhsconnect
# if you're using disqus for comments, add the shortname here. if not, leave this value blank.

gitter: true
gitter_room: gpconnect/Lobby

tiny_letter: true
tiny_letter_username: nhsconnectapi

twitter: true
twitter_username: nhsconnectapi
twitter_site_hashtags: GPConnect

host: 127.0.0.1
# the preview server used. Leave as is.

Expand Down
6 changes: 4 additions & 2 deletions _includes/twittercards.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{% if site.twitter %}
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@nhsconnectapi">
<meta name="twitter:creator" content="@nhsconnectapi">
<meta name="twitter:site" content="@{{site.twitter_username}}">
<meta name="twitter:creator" content="@{{site.twitter_username}}">
{% if page.title %}<meta name="twitter:title" content="{{ page.title }}">
{% else %}<meta name="twitter:title" content="{{ site.title }}">
{% endif %}{% if page.url %}<meta name="twitter:url" content="{{ site.url }}{{ page.url }}">
{% endif %}{% if page.description %}<meta name="twitter:description" content="{{ page.summary }}">
{% else %}<meta name="twitter:description" content="{{ site.description }}">
{% endif %}{% if page.thumbnail %}<meta name="twitter:image:src" content="{{ site.url }}/images/{{ page.thumbnail }}">
{% else %}<meta name="twitter:image:src" content="{{ site.url }}/images/logo.png">{% endif %}
{% endif %}
5 changes: 4 additions & 1 deletion _includes/twitterfollow.html
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<a href="https://twitter.com/nhsconnectapi" class="twitter-follow-button" data-size="large" data-show-count="false">Follow @nhsconnectapi</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
{% if site.twitter %}
<p>Follow us on Twitter for all the latest news and announcements:</p>
<a href="https://twitter.com/{{site.twitter_username}}" class="twitter-follow-button" data-size="large" data-show-count="false">Follow @{{site.twitter_username}}</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
{% endif %}
4 changes: 3 additions & 1 deletion _includes/twittershare.html
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<a href="http://twitter.com/share?url={{page.url}}&text={{page.title}}&via=nhsconnectapi&hashtags=GPConnect" class="twitter-share-button" data-size="large" data-show-count="true">Tweet Me</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
{% if site.twitter %}
<a href="http://twitter.com/share?url={{page.url}}&text={{page.title}}&via={{site.twitter_username}}&hashtags={{site.twitter_site_hashtags}}" class="twitter-share-button" data-size="large" data-show-count="true">Tweet Me</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
{% endif %}
4 changes: 3 additions & 1 deletion _includes/twittertimeline.html
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<a class="twitter-timeline" data-height="600" href="https://twitter.com/nhsconnectapi">Tweets by @nhsconnectapi</a> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
{% if site.twitter %}
<a class="twitter-timeline" data-height="600" href="https://twitter.com/{{site.twitter_username}}">Tweets by @{{site.twitter_username}}</a> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
{% endif %}
2 changes: 0 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ GP Connect aims to support better clinical care by opening up information and da

Find out more on the [NHS Digital GP Connect homepage](http://systems.digital.nhs.uk/gpsoc/interface/gpconnect).

Follow us on Twitter for all the latest news and announcements:

{% include twitterfollow.html %}

Or join the developer chat on Gitter:
Expand Down

0 comments on commit 639e299

Please sign in to comment.