Skip to content

Commit

Permalink
Merge pull request artemsheludko#24 from gutblog/master
Browse files Browse the repository at this point in the history
Fix invalid twitter card and GitHub Pages name clash
  • Loading branch information
artemsheludko authored Feb 12, 2018
2 parents 256d274 + 460ecd0 commit 045cffc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
10 changes: 5 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ site-twitter: #if your site has a twitter account, enter it here
author: David Freeman # add your name
author-img: david-freeman.jpg # add your photo
about-author: I am a web developer focusing on front-end development. Always hungry to keep learning. # add description
twitter: # add your Twitter handle
facebook: # add your Facebook handle
github: artemsheludko # add your Github handle
linkedin: # add your Linkedin handle
email: # add your Email address
social-twitter: # add your Twitter handle
social-facebook: # add your Facebook handle
social-github: artemsheludko # add your Github handle
social-linkedin: # add your Linkedin handle
social-email: # add your Email address

# Disqus
discus-identifier: mr-brown # add your discus identifier
Expand Down
10 changes: 3 additions & 7 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{% if page.img %}
<meta content="{{ site.url }}{{ site.baseurl }}/assets/img/{{ page.img }}" property="og:image">
{% else %}
<meta content="/img/{{ site.author-img }}" property="og:image">
<meta content="{{ site.url }}{{ site.baseurl }}/assets/img/{{ site.author-img }}" property="og:image">
{% endif %}
{% if page.categories %}
{% for category in page.categories limit:1 %}
Expand All @@ -43,13 +43,9 @@
{% endfor %}
{% endif %}

{% if post.excerpt %}
<meta name="twitter:card" content="{{ post.excerpt }}">
{% else %}
<meta name="twitter:card" content="{{ page.description }}">
{% endif %}
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@{{ site.site-twitter }}">
<meta name="twitter:creator" content="@{{ site.twitter }}">
<meta name="twitter:creator" content="@{{ site.social-twitter }}">
{% if page.title %}
<meta name="twitter:title" content="{{ page.title }}">
{% else %}
Expand Down
20 changes: 10 additions & 10 deletions _layouts/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@
<section class="contact">
<h3 class="contact-title">Contact me</h3>
<ul>
{% if site.twitter %}
<li><a href="https://twitter.com/{{ site.twitter }}" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
{% if site.social-twitter %}
<li><a href="https://twitter.com/{{ site.social-twitter }}" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
{% else %}
<li><a href="https://twitter.com/artemsheludko_" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
{% endif %}
{% if site.facebook %}
<li><a href="https://facebook.com/{{ site.facebook }}" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
{% if site.social-facebook %}
<li><a href="https://facebook.com/{{ site.social-facebook }}" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
{% else %}
<li><a href="https://facebook.com/" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
{% endif %}
{% if site.github %}
<li class="github"><a href="http://github.com/{{site.github}}" target="_blank"><i class="fa fa-github"></i></a></li>
{% if site.social-github %}
<li class="github"><a href="http://github.com/{{site.social-github}}" target="_blank"><i class="fa fa-github"></i></a></li>
{% else %}
<li class="github"><a href="http://github.com/" target="_blank"><i class="fa fa-github" aria-hidden="true"></i></a></li>
{% endif %}
{% if site.linkedin %}
<li class="linkedin"><a href="https://in.linkedin.com/in/{{site.linkedin}}" target="_blank"><i class="fa fa-linkedin"></i></a></li>
{% if site.social-linkedin %}
<li class="linkedin"><a href="https://in.linkedin.com/in/{{site.social-linkedin}}" target="_blank"><i class="fa fa-linkedin"></i></a></li>
{% else %}
<li class="linkedin"><a href="https://in.linkedin.com/" target="_blank"><i class="fa fa-linkedin" aria-hidden="true"></i></a></li>
{% endif %}
{% if site.email %}
<li class="email"><a href="mailto:{{site.email}}"><i class="fa fa-envelope-o"></i></a></li>
{% if site.social-email %}
<li class="email"><a href="mailto:{{site.social-email}}"><i class="fa fa-envelope-o"></i></a></li>
{% else %}
<li class="email"><a href="mailto:[email protected]"><i class="fa fa-envelope-o" aria-hidden="true"></i></a></li>
{% endif %}
Expand Down

0 comments on commit 045cffc

Please sign in to comment.