Skip to content

Commit 455afc9

Browse files
committed
added twitter share/follow buttons and seo tags.
1 parent cd96526 commit 455afc9

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gem 'jekyll-seo-tag'

_config.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
# Site settings
22
title: tmi.js - docs
33
4-
description: > # this means to ignore newlines until "baseurl:"
5-
Twitch is a trademark or registered trademark of Twitch Interactive, Inc. in the U.S. and/or other countries. "tmi.js" is not operated by, sponsored by, or affiliated with Twitch Interactive, Inc. in any way.
6-
baseurl: "" # the subpath of your site, e.g. /blog
7-
url: "https://docs.tmijs.org" # the base hostname & protocol for your site
4+
description: "Twitch is a trademark or registered trademark of Twitch Interactive, Inc. in the U.S. and/or other countries. \"tmi.js\" is not operated by, sponsored by, or affiliated with Twitch Interactive, Inc. in any way."
5+
baseurl: ""
6+
url: "https://docs.tmijs.org"
87
twitter_username: Schmoopiie
98
github_username: tmi.js
9+
logo: "https://i.imgur.com/vsdO7N5.png"
1010
permalink: :categories/:title.html
1111
latest_version: v0.0.29
1212
hidden_versions:
13-
- v1.0.0
13+
- v1.0.0-rc1
14+
twitter:
15+
username: Schmoopiie
1416

1517
# Build settings
1618
markdown: kramdown
1719

1820
sass:
1921
sass_dir: _sass
2022
style: compressed
23+
24+
gems:
25+
- jekyll-seo-tag

_includes/footer.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,14 @@
1414

1515
<div class="footer-col footer-col-2">
1616
<ul class="social-media-list">
17-
{% if site.github_username %}
17+
{% if site.twitter_username %}
1818
<li>
19-
{% include icon-github.html username=site.github_username %}
19+
<a href="https://twitter.com/{{ site.twitter_username }}" class="twitter-follow-button" data-show-count="false">Follow @{{ site.twitter_username }}</a>
2020
</li>
2121
{% endif %}
22-
23-
{% if site.twitter_username %}
2422
<li>
25-
{% include icon-twitter.html username=site.twitter_username %}
23+
<a href="https://twitter.com/share" class="twitter-share-button" data-via="Schmoopiie" data-hashtags="tmi.js">Tweet</a>
2624
</li>
27-
{% endif %}
2825
</ul>
2926
</div>
3027

@@ -36,6 +33,7 @@
3633
</div>
3734
</footer>
3835
<script src="{{ site.url }}/js/anchor.min.js"></script>
36+
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
3937
<script>
4038
var selector = ".docs-layout h2, .docs-layout h3";
4139
anchors.options = {
@@ -71,7 +69,7 @@
7169
var parts = url.split("/");
7270

7371
// No version specified in the URL..
74-
if (/^v(\d+\.)?(\d+\.)?(\*|\d+)$/.test(parts[parts.length-2]) === false) {
72+
if (/^v(\d+\.)?(\d+\.)?(\*|\d+)\(rc\d+)?$/.test(parts[parts.length-2]) === false) {
7573
var e = document.getElementById("version");
7674
var strUser = e.options[e.selectedIndex].value;
7775
links[i].href = url + strUser + "/" + file;

_includes/head.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.url }}">
1010
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
1111
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
12+
{% seo title=false %}
1213
</head>

0 commit comments

Comments
 (0)