Move repeated details to variables _config.yml and general cleanup

This commit is contained in:
2015-12-19 22:14:21 +00:00
parent cfeacd564d
commit ccc35d3be0
12 changed files with 60 additions and 69 deletions

View File

@@ -1,3 +1,9 @@
absolute: http://localhost:4000
title: Rik @ St Andrews
author: Rik Veenboer
email: rik.veenboer@gmail.com
disqus: boukefalos
analytics: UA-46375339-1
gems: [jekyll-paginate]
markdown: kramdown
paginate: 7

6
_includes/base.html Normal file
View File

@@ -0,0 +1,6 @@
{% assign base = '' %}
{% assign depth = page.url | split: '/' | size | minus: 1 %}
{% if depth == 1 %}{% assign base = '.' %}
{% elsif depth == 2 %}{% assign base = '..' %}
{% elsif depth == 3 %}{% assign base = '../..' %}
{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}

View File

@@ -1,10 +1,10 @@
<div class="disqus screen-only">
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'dpb587';
var disqus_shortname = '{{ site.disqus }}';
var disqus_identifier = '{{ page.id }}';
var disqus_title = '{{ page.title|replace:"'":"\\'" }}';
var disqus_url = 'http://dpb587.me{{ page.url }}';
var disqus_url = '{{ site.absolute }}{{ page.url }}';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
@@ -12,6 +12,4 @@
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>

View File

@@ -1,8 +1,7 @@
</article>
<footer>
Thanks for visiting<span class="print-only"> <a href="http://dpb587.me">dpb587.me</a></span>! This is a personal site &ndash; it reflects my own opinions and not those of my employers, past or present.<br />
This site is <a href="https://github.com/dpb587/dpb587.me">open-source</a>.
Unless noted, software code is licensed under <a href="http://opensource.org/licenses/mit-license.php">MIT License</a> and all other content under <a href="http://creativecommons.org/licenses/by/3.0/">CC-BY</a>.
This site will be open-source.
Unless noted, software code is licensed under <a href="http://opensource.org/licenses/GPL-3.0">GPL-3.0 License</a> and all other content under <a href="http://creativecommons.org/licenses/by/3.0/">CC-BY</a>.
</footer>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<script>(function(){var po=document.createElement('script');po.type='text/javascript';po.async=true;po.src='https://apis.google.com/js/plusone.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s);})();</script>

View File

@@ -3,17 +3,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{% if page.title != "Home" %}{{ page.title }} &ndash; {% endif %}Danny Berger</title>
<title>{% if page.title != "Home" %}{{ page.title }} &ndash; {% endif %}{{ site.title }}</title>
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css" />
<link href="{{ site.static_prefix }}/style/default-common.css" rel="stylesheet" type="text/css" />
<link href="{{ site.static_prefix }}/style/default-print.css" media="print" rel="stylesheet" type="text/css" />
<link href="{{ site.static_prefix }}/style/pygments.css" rel="stylesheet" type="text/css" />
<link href="/blog/atom.xml" type="application/atom+xml" rel="alternate" title="Danny Berger (blog)" />
{% if page.path %}
<meta property="jekyll-source" content="https://raw.githubusercontent.com/dpb587/dpb587.me/master/{{ page.path }}" />
{% endif %}
<link href="{{ site.absolute }}/blog/atom.xml" type="application/atom+xml" rel="alternate" title="{{ site.title }}" />
{% if page.description %}
<meta name="description" content="{{ page.description }}" />
@@ -25,58 +21,32 @@
<meta name="viewport" content="width=756" />
<link href="http://dpb587.me{{ page.url|replace:'/index.html','/' }}" rel="canonical" />
<link href="{{ site.absolute }}{{ page.url|replace:'/index.html','/' }}" rel="canonical" />
<meta property="og:title" content="{% if page.title == 'Home' %}Danny Berger{% else %}{{ page.title }}{% endif %}" />
<meta property="og:url" content="http://dpb587.me{% if page.url != '/index.html' %}{{ page.url }}{% endif %}?utm_campaign=ref&amp;utm_medium=def&amp;utm_source=opengraph" />
<meta property="og:title" content="{% if page.title == 'Home' %}{{ site.title }}{% else %}{{ page.title }}{% endif %}" />
<meta property="og:url" content="{{ site.baseurl }}{% if page.url != '/index.html' %}{{ page.url }}{% endif %}?utm_campaign=ref&amp;utm_medium=def&amp;utm_source=opengraph" />
{% if page.description %}
<meta property="og:description" content="{{ page.description }}" />
{% endif %}
<meta name="twitter:domain" content="dpb587.me" />
<meta name="twitter:site" content="@dpb587" />
<meta name="twitter:creator" content="@dpb587" />
<meta name="twitter:url" content="http://dpb587.me{% if page.url != '/index.html' %}{{ page.url }}{% endif %}?utm_campaign=ref&amp;utm_medium=def&amp;utm_source=twitter" />
<meta name="twitter:title" content="{% if page.title == 'Home' %}Danny Berger{% else %}{{ page.title }}{% endif %}" />
{% if page.description %}
<meta name="twitter:description" content="{{ page.description }}" />
{% endif %}
{% if 'gallery-photo' == page.layout %}
<meta name="twitter:card" content="photo" />
<meta name="twitter:image:src" content="{{ site.asset_prefix }}{{ page.url|replace:".html","~640.jpg" }}" />
{% else %}
<meta name="twitter:card" content="summary" />
{% if page.primary_image %}
<meta name="twitter:image:src" content="{{ site.asset_prefix }}{{ page.primary_image }}" />
{% endif %}
{% endif %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-37464314-1']);
_gaq.push(['_setAccount', '{{ site.analytics }}']);
_gaq.push(['_trackPageview']);
(function() {
if ('dpb587.me' != window.location.hostname) return;
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body class="layout-{{ page.layout }}{% if page.body_class %} {{ page.body_class }}{% endif %}">
<header>
<div class="timeline">
<a href="/"><img alt="DPB" src="http://www.gravatar.com/avatar/5544fe6a05400da5a8957ff29dd6718c.png?s=128" /></a>
</div>
<!--div class="timeline">
<a href="/"><img alt="" src="" /></a>
</div-->
<ul class="screen-only">
{% if 'dev' == site.environment %}
<li><a href="/private/">private</a></li>
<li><a href="{{ site.baseurl }}/private/">private</a></li>
{% endif %}
<li><a href="/blog/">blog</a></li>
<li><a href="/gallery/">gallery</a></li>
<li><a href="/projects.html">projects</a></li>
<li><a href="/about.html">about</a></li>
<li><a href="{{ site.baseurl }}/blog/">blog</a></li>
<li><a href="{{ site.baseurl }}/gallery/">gallery</a></li>
<li><a href="{{ site.baseurl }}/about.html">about</a></li>
</ul>
{% if page.print_blurb %}
<ul class="print-only">
@@ -84,21 +54,15 @@
</ul>
{% endif %}
<div class="site-title">
<strong><a href="/">Danny Berger</a></strong>
<strong><a href="/">{{ site.title }}</a></strong>
</div>
<div class="meta screen-only">
<a class="subtle" href="http://dpb587.me/">dpb587</a>
<a href="https://github.com/boukefalos">github</a>
&middot;
<a href="https://github.com/dpb587">github</a>
<span style="display:none;">
&middot;
<a href="https://plus.google.com/101881290181099762326?rel=author">google+</a>
</span>
&middot;
<a href="mailto:dpb587@gmail.com">email</a>
<a href="mailto:{{ site.email }}">email</a>
</div>
<div class="meta print-only">
<a href="http://dpb587.me/" style="color:inherit;">http://dpb587.me</a>
<a href="{{ site.baseurl }}/" style="color:inherit;">{{ site.baseurl }}</a>
</div>
</header>
<article>

View File

@@ -0,0 +1 @@
<a href="https://github.com/{{ include.username }}"><span class="icon icon--github">{% include icon-github.svg %}</span><span class="username">{{ include.username }}</span></a>

View File

@@ -0,0 +1 @@
<svg viewBox="0 0 16 16"><path fill="#828282" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/></svg>

After

Width:  |  Height:  |  Size: 926 B

View File

@@ -0,0 +1 @@
<a href="https://twitter.com/{{ include.username }}"><span class="icon icon--twitter">{% include icon-twitter.svg %}</span><span class="username">{{ include.username }}</span></a>

View File

@@ -0,0 +1 @@
<svg viewBox="0 0 16 16"><path fill="#828282" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/></svg>

After

Width:  |  Height:  |  Size: 787 B

14
_layouts/page.html Normal file
View File

@@ -0,0 +1,14 @@
---
layout: default
---
<article class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
</header>
<div class="post-content">
{{ content }}
</div>
</article>

View File

@@ -1,22 +1,23 @@
---
layout: null
---
{% include base.html %}
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>http://dpb587.me/</id>
<title>Danny Berger</title>
<link href="http://dpb587.me/blog/atom.xml" rel="self"/>
<link href="http://dpb587.me/"/>
<id>{{ site.baseurl }}/</id>
<title>{{ site.author }}</title>
<link href="{{ site.absolute }}/blog/atom.xml" rel="self"/>
<link href="{{ site.absolute }}/"/>
<updated>{{ site.time|date_to_xmlschema }}</updated>
<author>
<name>Danny Berger</name>
<email>dpb587@gmail.com</email>
<name>{{ site.author }}</name>
<email>{{ site.email }}</email>
</author>
{% for post in site.posts %}
<entry>
<id>http://dpb587.me{{ post.id }}</id>
<id>{{ site.absolute }}/{{ post.id }}</id>
<title>{{ post.title }}</title>
<link href="http://dpb587.me{{ post.url }}"/>
<link href="{{ site.absolute }}{{ post.url }}"/>
<updated>{{ post.date|date_to_xmlschema }}</updated>
<content type="html">{{ post.content|xml_escape }}</content>
</entry>

View File

@@ -2,7 +2,6 @@
title: Blog Summary
layout: default
---
{% for post in site.posts %}
<section>
<header>