Skip to content

Commit 4838610

Browse files
committed
Merge in updates from Poole 2.0
Changes based on: - poole/hyde/pull/97 - poole/hyde/pull/137
1 parent 63c873b commit 4838610

File tree

8 files changed

+62
-65
lines changed

8 files changed

+62
-65
lines changed

_config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ gems:
88
permalink: pretty
99

1010
# Setup
11-
author: "Alexander Gude"
11+
author:
12+
name: "Alexander Gude"
13+
1214
title: "Alex Gude"
1315
tagline: "Data Scientist"
1416
description: "The home page and blog of Alexander Gude"

_includes/head.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<head>
2-
<link href="http://gmpg.org/xfn/11" rel="profile">
3-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
42
<meta charset="UTF-8">
53

64
<!-- Enable responsiveness on mobile devices-->
7-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
86

97
<!--Twitter card and OpenGraph-->
108
{% if page.title == "Home" %}
@@ -76,8 +74,8 @@
7674

7775
<!-- Icons -->
7876
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.baseurl }}/public/apple-touch-icon-144-precomposed.png">
79-
<link rel="shortcut icon" href="{{ site.baseurl }}/public/favicon.ico">
77+
<link rel="shortcut icon" href="{{ site.baseurl }}/public/favicon.ico">
8078

8179
<!-- RSS -->
82-
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">
80+
<link rel="alternate" type="application/atom+xml" title="{{ site.title }}" href="{{ site.baseurl }}/atom.xml">
8381
</head>

_includes/sidebar.html

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,33 @@
1-
<div class="sidebar">
1+
{% assign homeurl = site.baseurl | append: "/" %}
2+
3+
<aside class="sidebar">
24
<div class="container sidebar-sticky">
35
<div class="sidebar-about">
46
<h1>
5-
<a href="{{ site.baseurl }}/">
6-
{{ site.title }}
7-
</a>
7+
<a href="{{ homeurl }}" title="Home">{{ site.title }}</a>
88
</h1>
99
<p class="lead">{{ site.description }}</p>
1010
</div>
1111

1212
<nav class="sidebar-nav">
13-
<a class="sidebar-nav-item{% if page.url == site.baseurl %} active{% endif %}" href="{{ site.baseurl }}/">Home</a>
13+
<a class="sidebar-nav-item{% if page.url == homeurl %} active{% endif %}" href="{{ homeurl }}">Home</a>
1414

1515
{% comment %}
16-
The code below dynamically generates a sidebar nav of pages with
17-
`layout: page` in the front-matter. See readme for usage.
16+
The code below dynamically generates a sidebar nav of pages with `layout: page` in the front-matter.
1817
{% endcomment %}
1918

20-
{% assign pages_list = site.pages %}
21-
{% for node in pages_list %}
22-
{% if node.title != null %}
23-
{% if node.layout == "page" %}
24-
{% unless node.url contains "page" %} {% comment %} Paginated Blog pages should not be included in the sidebar. {% endcomment %}
25-
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{site.baseurl}}{{ node.url }}">{{ node.title }}</a>
26-
{% endunless %}
27-
{% endif %}
19+
{% for node in site.pages %}
20+
{% if node.title != null and node.layout == "page" %}
21+
{% unless node.url contains "page" %} {% comment %} Paginated Blog pages should not be included in the sidebar. {% endcomment %}
22+
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{site.baseurl}}{{ node.url }}">{{ node.title }}</a>
23+
{% endunless %}
2824
{% endif %}
2925
{% endfor %}
3026

3127
</nav>
3228

33-
<p>&copy; {{ site.time | date: '%Y' }}. All rights reserved.</p>
29+
<small>
30+
&copy; <time datetime="{{ site.time | date_to_xmlschema }}">{{ site.time | date: '%Y' }}</time>. All rights reserved.
31+
</small>
3432
</div>
35-
</div>
33+
</aside>

_layouts/default.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<!DOCTYPE html>
2-
<html lang="en-us">
2+
<html lang="en">
33

44
{% include head.html %}
55

66
<body>
77

88
{% include sidebar.html %}
99

10-
<div class="content container">
10+
<main class="content container">
1111
{{ content }}
12-
</div>
12+
</main>
1313

1414
</body>
1515
</html>

_layouts/page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: default
33
---
44

5-
<div class="page">
5+
<article class="page">
66
<h1 class="page-title">{{ page.title }}</h1>
77
{{ content }}
8-
</div>
8+
</article>

_layouts/post.html

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,30 @@
22
layout: default
33
---
44

5-
<div class="post">
5+
<article class="post">
66
<h1 class="post-title">{{ page.title }}</h1>
7-
<span class="post-date">{{ page.date | date: '%B %d, %Y' }}</span>
7+
<time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date: '%B %d, %Y' }}</time>
88
{{ content }}
9-
</div>
9+
</article>
1010

11-
<!-- Related Posts -->
12-
<div class="related">
13-
<h2>Related Posts</h2>
14-
<ul class="related-posts">
15-
{% for post in site.related_posts limit:3 %}
16-
<li>
17-
<h3>
18-
<a href="{{ post.url }}">
19-
{{ post.title }}
20-
<small>{{ post.date | date: '%B %d, %Y' }}</small>
21-
</a>
22-
</h3>
23-
</li>
24-
{% endfor %}
25-
</ul>
26-
</div>
11+
{% if site.related_posts != empty %}
12+
<!-- Related Posts -->
13+
<aside class="related">
14+
<h2>Related Posts</h2>
15+
<ul class="related-posts">
16+
{% for post in site.related_posts limit:3 %}
17+
<li>
18+
<h3>
19+
<a href="{{ site.baseurl }}{{ post.url }}">
20+
{{ post.title }}
21+
<small><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: '%B %d, %Y' }}</time></small>
22+
</a>
23+
</h3>
24+
</li>
25+
{% endfor %}
26+
</ul>
27+
</aside>
28+
{% endif %}
2729

2830
<!-- Share Buttons -->
2931
{% include share.html %}

atom.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,18 @@ layout: null
66
<feed xmlns="http://www.w3.org/2005/Atom">
77

88
<title>{{ site.title }}</title>
9-
<link href="{{ site.url }}/atom.xml" rel="self"/>
10-
<link href="{{ site.url }}/"/>
9+
<link href="{{ site.url }}{{ site.baseurl }}/atom.xml" rel="self"/>
10+
<link href="{{ site.url }}{{ site.baseurl }}/"/>
1111
<updated>{{ site.time | date_to_xmlschema }}</updated>
1212
<id>{{ site.url }}</id>
1313
<author>
1414
<name>{{ site.author.name }}</name>
15-
<email>{{ site.author.email }}</email>
1615
</author>
1716

1817
{% for post in site.posts %}
1918
<entry>
20-
<title>{{ post.title }}</title>
21-
<link href="{{ site.url }}{{ post.url }}"/>
19+
<title>{{ post.title | xml_escape }}</title>
20+
<link href="{{ site.url }}{{ site.baseurl }}{{ post.url }}"/>
2221
<updated>{{ post.date | date_to_xmlschema }}</updated>
2322
<id>{{ site.url }}{{ post.id }}</id>
2423
<content type="html">{{ post.content | xml_escape }}</content>

blog/index.html

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,28 @@
55

66
<div class="posts">
77
{% for post in paginator.posts %}
8-
<div class="post">
9-
<h1 class="post-title">
10-
<a href="{{ post.url }}">
11-
{{ post.title }}
12-
</a>
13-
</h1>
8+
<article class="post">
9+
<h1 class="post-title">
10+
<a href="{{site.baseurl}}{{ post.url }}">
11+
{{ post.title }}
12+
</a>
13+
</h1>
1414

15-
<span class="post-date">{{ post.date | date: '%B %d, %Y' }}</span>
15+
<time datetime="{{ post.date | date_to_xmlschema }}" class="post-date">{{ post.date | date: '%B %d, %Y' }}</time>
1616

17-
{{ post.content }}
18-
</div>
17+
{{ post.content }}
18+
</article>
1919
{% endfor %}
2020
</div>
2121

2222
<div class="pagination">
2323
{% if paginator.next_page %}
24-
<a class="pagination-item older" href="{{ paginator.next_page_path }}">Older</a>
24+
<a class="pagination-item older" href="{{ paginator.next_page_path | prepend: site.baseurl }}">Older</a>
2525
{% else %}
2626
<span class="pagination-item older">Older</span>
2727
{% endif %}
2828
{% if paginator.previous_page %}
29-
{% if paginator.page == 2 %}
30-
<a class="pagination-item newer" href="{{ paginator.previous_page_path }}">Newer</a>
31-
{% endif %}
29+
<a class="pagination-item newer" href="{{ paginator.previous_page_path | prepend: site.baseurl }}">Newer</a>
3230
{% else %}
3331
<span class="pagination-item newer">Newer</span>
3432
{% endif %}

0 commit comments

Comments
 (0)