Simplify and organize _config.yml variables
This commit is contained in:
@ -1,22 +1,24 @@
|
||||
{% if site.owner.avatar contains 'http://' %}
|
||||
<img src="{{ site.owner.avatar }}" class="bio-photo" alt="{{ site.owner.name }} bio photo"></a>
|
||||
{% elsif site.owner.avatar contains 'https://' %}
|
||||
<img src="{{ site.owner.avatar }}" class="bio-photo" alt="{{ site.owner.name }} bio photo"></a>
|
||||
{% else %}
|
||||
<img src="{{ site.url }}/images/{{ site.owner.avatar }}" class="bio-photo" alt="{{ site.owner.name }} bio photo"></a>
|
||||
{% if page.author %}
|
||||
{% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.owner %}
|
||||
{% endif %}
|
||||
<h3>{{ site.owner.name }}</h3>
|
||||
<p>{{ site.owner.bio }}</p>
|
||||
{% if site.owner.twitter %}<a href="http://twitter.com/{{ site.owner.twitter }}" class="author-social" target="_blank"><i class="fa fa-twitter-square"></i> Twitter</a>{% endif %}
|
||||
{% if site.owner.facebook %}<a href="http://facebook.com/{{ site.owner.facebook }}" class="author-social" target="_blank"><i class="fa fa-facebook-square"></i> Facebook</a>{% endif %}
|
||||
{% if site.owner.google_plus %}<a href="http://plus.google.com/+{{ site.owner.google_plus }}" class="author-social" target="_blank"><i class="fa fa-google-plus-square"></i> Google+</a>{% endif %}
|
||||
{% if site.owner.linkedin %}<a href="http://linkedin.com/in/{{ site.owner.linkedin }}" class="author-social" target="_blank"><i class="fa fa-linkedin-square"></i> LinkedIn</a>{% endif %}
|
||||
{% if site.owner.instagram %}<a href="http://instagram.com/{{ site.owner.instagram }}" class="author-social" target="_blank"><i class="fa fa-instagram"></i> Instagram</a>{% endif %}
|
||||
{% if site.owner.tumblr %}<a href="http://{{ site.owner.tumblr }}.tumblr.com" class="author-social" target="_blank"><i class="fa fa-tumblr-square"></i> Tumblr</a>{% endif %}
|
||||
{% if site.owner.github %}<a href="http://github.com/{{ site.owner.github }}" class="author-social" target="_blank"><i class="fa fa-github"></i> Github</a>{% endif %}
|
||||
{% if site.owner.stackoverflow %}<a href="http://stackoverflow.com/users/{{ site.owner.stackoverflow }}" class="author-social" target="_blank"><i class="fa fa-stack-overflow"></i> Stackoverflow</a>{% endif %}
|
||||
{% if site.owner.lastfm %}<a href="http://lastfm.com/user/{{ site.owner.lastfm }}" class="author-social" target="_blank"><i class="fa fa-music"></i> Last.fm</a>{% endif %}
|
||||
{% if site.owner.dribbble %}<a href="http://dribbble.com/{{ site.owner.dribbble }}" class="author-social" target="_blank"><i class="fa fa-dribbble"></i> Dribbble</a>{% endif %}
|
||||
{% if site.owner.pinterest %}<a href="http://www.pinterest.com/{{ site.owner.pinterest }}" class="author-social" target="_blank"><i class="fa fa-pinterest"></i> Pinterest</a>{% endif %}
|
||||
{% if site.owner.foursquare %}<a href="http://foursquare.com/{{ site.owner.foursquare }}" class="author-social" target="_blank"><i class="fa fa-foursquare"></i> Foursquare</a>{% endif %}
|
||||
{% if site.owner.steam %}<a href="http://steamcommunity.com/id/{{ site.owner.steam }}" class="author-social" target="_blank"><i class="fa fa-steam-square"></i> Steam</a>{% endif %}
|
||||
|
||||
{% if author.avatar contains 'http' %}
|
||||
<img src="{{ author.avatar }}" class="bio-photo" alt="{{ author.name }} bio photo"></a>
|
||||
{% else %}
|
||||
<img src="{{ site.url }}/images/{{ author.avatar }}" class="bio-photo" alt="{{ author.name }} bio photo"></a>
|
||||
{% endif %}
|
||||
<h3>{{ author.name }}</h3>
|
||||
<p>{{ author.bio }}</p>
|
||||
{% if author.twitter %}<a href="http://twitter.com/{{ author.twitter }}" class="author-social" target="_blank"><i class="fa fa-twitter-square"></i> Twitter</a>{% endif %}
|
||||
{% if author.facebook %}<a href="http://facebook.com/{{ author.facebook }}" class="author-social" target="_blank"><i class="fa fa-facebook-square"></i> Facebook</a>{% endif %}
|
||||
{% if author.google_plus %}<a href="http://plus.google.com/+{{ author.google_plus }}" class="author-social" target="_blank"><i class="fa fa-google-plus-square"></i> Google+</a>{% endif %}
|
||||
{% if author.linkedin %}<a href="http://linkedin.com/in/{{ author.linkedin }}" class="author-social" target="_blank"><i class="fa fa-linkedin-square"></i> LinkedIn</a>{% endif %}
|
||||
{% if author.instagram %}<a href="http://instagram.com/{{ author.instagram }}" class="author-social" target="_blank"><i class="fa fa-instagram"></i> Instagram</a>{% endif %}
|
||||
{% if author.tumblr %}<a href="http://{{ author.tumblr }}.tumblr.com" class="author-social" target="_blank"><i class="fa fa-tumblr-square"></i> Tumblr</a>{% endif %}
|
||||
{% if author.github %}<a href="http://github.com/{{ author.github }}" class="author-social" target="_blank"><i class="fa fa-github"></i> Github</a>{% endif %}
|
||||
{% if author.stackoverflow %}<a href="http://stackoverflow.com/users/{{ author.stackoverflow }}" class="author-social" target="_blank"><i class="fa fa-stack-overflow"></i> Stackoverflow</a>{% endif %}
|
||||
{% if author.lastfm %}<a href="http://lastfm.com/user/{{ author.lastfm }}" class="author-social" target="_blank"><i class="fa fa-music"></i> Last.fm</a>{% endif %}
|
||||
{% if author.dribbble %}<a href="http://dribbble.com/{{ author.dribbble }}" class="author-social" target="_blank"><i class="fa fa-dribbble"></i> Dribbble</a>{% endif %}
|
||||
{% if author.pinterest %}<a href="http://www.pinterest.com/{{ author.pinterest }}" class="author-social" target="_blank"><i class="fa fa-pinterest"></i> Pinterest</a>{% endif %}
|
||||
{% if author.foursquare %}<a href="http://foursquare.com/{{ author.foursquare }}" class="author-social" target="_blank"><i class="fa fa-foursquare"></i> Foursquare</a>{% endif %}
|
||||
{% if author.steam %}<a href="http://steamcommunity.com/id/{{ author.steam }}" class="author-social" target="_blank"><i class="fa fa-steam-square"></i> Steam</a>{% endif %}
|
@ -1,7 +1,7 @@
|
||||
{% if site.disqus_shortname %}
|
||||
{% if site.owner.disqus-shortname %}
|
||||
<script type="text/javascript">
|
||||
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
||||
var disqus_shortname = '{{ site.disqus_shortname }}'; // required: replace example with your forum shortname
|
||||
var disqus_shortname = '{{ site.owner.disqus-shortname }}'; // required: replace example with your forum shortname
|
||||
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function() {
|
||||
|
@ -1 +1,13 @@
|
||||
<div class="google-ads">
|
||||
<!-- 320 x 50 ad -->
|
||||
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<ins class="adsbygoogle"
|
||||
style="display:inline-block;width:320px;height:50px"
|
||||
data-ad-client="{{ site.owner.google.ad-client }}"
|
||||
data-ad-slot="{{ site.owner.goodle.slot }}"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
</div><!-- /.google-ads -->
|
||||
|
||||
<span>© {{ site.time | date: '%Y' }} {{ site.owner.name }}. Powered by <a href="http://jekyllrb.com">Jekyll</a> using the <a href="http://mademistakes.com/minimal-mistakes/">Minimal Mistakes</a> theme.</span>
|
||||
|
@ -1,62 +1,21 @@
|
||||
<meta charset="utf-8">
|
||||
<title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.title }}</title>
|
||||
<meta name="description" content="{{ page.description }}">
|
||||
{% if page.excerpt %}<meta name="description" content="{{ page.excerpt | strip_html }}">{% endif %}
|
||||
<meta name="keywords" content="{{ page.tags | join: ', ' }}">
|
||||
{% if site.owner.twitter %}<!-- Twitter Cards -->
|
||||
{% if page.image.feature %}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content=
|
||||
{% if page.image.feature contains 'http://' %}
|
||||
"{{ page.image.feature }}"
|
||||
{% elsif page.image.feature contains 'https://' %}
|
||||
"{{ page.image.feature }}"
|
||||
{% else %}
|
||||
"{{ site.url }}/images/{{ page.image.feature }}"
|
||||
{% endif %}
|
||||
>
|
||||
{% else %}
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:image" content=
|
||||
{% if page.image.thumb %}
|
||||
{% if page.image.thumb contains 'http://' %}
|
||||
"{{ page.image.thumb }}"
|
||||
{% elsif page.image.thumb contains 'https://' %}
|
||||
"{{ page.image.thumb }}"
|
||||
{% else %}
|
||||
"{{ site.url }}/images/{{ page.image.thumb }}"
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if site.logo contains 'http://' %}
|
||||
"{{ site.logo }}"
|
||||
{% elsif site.logo contains 'https://' %}
|
||||
"{{ site.logo }}"
|
||||
{% else %}
|
||||
"{{ site.url }}/images/{{ site.logo }}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
>
|
||||
{% endif %}
|
||||
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
|
||||
<meta name="twitter:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
|
||||
<meta name="twitter:creator" content="@{{ site.owner.twitter }}">
|
||||
{% if page.author %}
|
||||
{% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.owner %}
|
||||
{% endif %}
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:locale" content="en_US">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
|
||||
<meta property="og:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
|
||||
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
|
||||
<meta property="og:site_name" content="{{ site.title }}">
|
||||
{% include _open-graph.html %}
|
||||
|
||||
{% if site.google_verify %}<!-- Webmaster Tools verfication -->
|
||||
<meta name="google-site-verification" content="{{ site.google_verify }}">{% endif %}
|
||||
{% if site.bing_verify %}<meta name="msvalidate.01" content="{{ site.bing_verify }}">{% endif %}
|
||||
{% if site.owner.google.verify %}<!-- Webmaster Tools verfication -->
|
||||
<meta name="google-site-verification" content="{{ site.owner.google.verify }}">{% endif %}
|
||||
{% if site.owner.bing-verify %}<meta name="msvalidate.01" content="{{ site.owner.bing-verify }}">{% endif %}
|
||||
|
||||
{% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
|
||||
<link rel="canonical" href="{{ canonical }}">
|
||||
<link href="{{ site.url }}/feed.xml" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed">
|
||||
{% if site.owner.google_plus %}<link rel="author" href="http://plus.google.com/+{{ site.owner.google_plus }}?rel=author">{% endif %}
|
||||
{% if site.owner.google.plus %}<link rel="author" href="http://plus.google.com/+{{ site.owner.google.plus }}?rel=author">{% endif %}
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
|
19
_includes/_open-graph.html
Normal file
19
_includes/_open-graph.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!-- Twitter Cards -->
|
||||
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
|
||||
{% if page.excerpt %}<meta name="twitter:description" content="{{ page.excerpt | strip_html }}">{% endif %}
|
||||
{% if site.owner.twitter %}<meta name="twitter:site" content="@{{ site.owner.twitter }}">{% endif %}
|
||||
{% if author.twitter %}<meta name="twitter:creator" content="@{{ author.twitter }}">{% endif %}
|
||||
{% if page.image.feature %}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="{{ site.url }}/images/{{ page.image.feature }}">
|
||||
{% else %}
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:image" content="{% if page.image.thumb %}{{ site.url }}/images/{{ page.image.thumb }}{% else %}{{ site.url }}/images/{{ site.logo }}{% endif %}">
|
||||
{% endif %}
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:locale" content="{{ site.locale }}">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
|
||||
{% if page.excerpt %}<meta property="og:description" content="{{ page.excerpt | strip_html }}">{% endif %}
|
||||
<meta property="og:url" content="{{ page.url | replace:'index.html','' | prepend: site.url }}">
|
||||
<meta property="og:site_name" content="{{ site.title }}">
|
@ -1,14 +1,14 @@
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="{{ site.url }}/assets/js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
|
||||
<script src="{{ site.url }}/assets/js/scripts.min.js"></script>
|
||||
{% if site.google_analytics %}
|
||||
{% if site.owner.google.analytics %}
|
||||
<!-- Asynchronous Google Analytics snippet -->
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
var pluginUrl =
|
||||
'//www.google-analytics.com/plugins/ga/inpage_linkid.js';
|
||||
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
|
||||
_gaq.push(['_setAccount', '{{ site.google_analytics }}']);
|
||||
_gaq.push(['_setAccount', '{{ site.owner.google.analytics }}']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
|
Reference in New Issue
Block a user