Skip to content

Commit 998f32c

Browse files
committed
Update for jekyll 3 poole/hyde#137
1 parent 42710e9 commit 998f32c

24 files changed

+582
-514
lines changed

404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
<div class="page">
88
<h1 class="page-title">404: Page not found</h1>
9-
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ site.baseurl }}">Head back home</a> to try finding it again.</p>
9+
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ site.baseurl }}/">Head back home</a> to try finding it again.</p>
1010
</div>

_config.yml

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
1-
# Dependencies
2-
markdown: redcarpet
3-
highlighter: pygments
4-
51
# Permalinks
6-
permalink: pretty
7-
relative_permalinks: true
2+
permalink: pretty
83

94
# Setup
10-
title: Hyde
11-
tagline: 'A Jekyll theme'
12-
description: 'A brazen two-column <a href="http://jekyllrb.com" target="_blank">Jekyll</a> theme that pairs a prominent sidebar with uncomplicated content. Made by <a href="https://twitter.com/mdo" target="_blank">@mdo</a>.'
13-
url: http://hyde.getpoole.com
14-
baseurl: /
5+
title: Hyde
6+
tagline: A Jekyll theme
7+
description: >
8+
A brazen two-column <a href="http://jekyllrb.com" target="_blank">Jekyll</a>
9+
theme that pairs a prominent sidebar with uncomplicated content.
10+
Made by <a href="https://twitter.com/mdo" target="_blank">@mdo</a>.
11+
url: http://hyde.getpoole.com
12+
paginate: 5
13+
baseurl: ""
1514

16-
author:
17-
name: 'Mark Otto'
18-
url: https://twitter.com/mdo
15+
# Assets
16+
sass:
17+
style: :compressed
1918

20-
paginate: 5
19+
# About/contact
20+
author:
21+
name: Mark Otto
22+
url: https://twitter.com/mdo
23+
email: markdotto@gmail.com
2124

2225
# Custom vars
23-
version: 2.1.0
24-
26+
version: 2.1.0
2527
github:
26-
repo: https://github.com/poole/hyde
28+
repo: https://github.com/poole/hyde
29+
30+
# Gems
31+
gems:
32+
- jekyll-paginate
33+
- jekyll-gist

_includes/head.html

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<head>
2-
<link href="http://gmpg.org/xfn/11" rel="profile">
3-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4-
<meta http-equiv="content-type" content="text/html; charset=utf-8">
5-
6-
<!-- Enable responsiveness on mobile devices-->
7-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
2+
<meta charset="UTF-8">
3+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
84

95
<title>
106
{% if page.title == "Home" %}
@@ -14,16 +10,11 @@
1410
{% endif %}
1511
</title>
1612

17-
<!-- CSS -->
18-
<link rel="stylesheet" href="{{ site.baseurl }}public/css/poole.css">
19-
<link rel="stylesheet" href="{{ site.baseurl }}public/css/syntax.css">
20-
<link rel="stylesheet" href="{{ site.baseurl }}public/css/hyde.css">
13+
<link rel="stylesheet" href="{{ site.baseurl }}/css/poole.css">
14+
<link rel="stylesheet" href="{{ site.baseurl }}/css/hyde.css">
2115
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
2216

23-
<!-- Icons -->
24-
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.baseurl }}public/apple-touch-icon-144-precomposed.png">
25-
<link rel="shortcut icon" href="{{ site.baseurl }}public/favicon.ico">
26-
27-
<!-- RSS -->
28-
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">
17+
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.baseurl }}/public/apple-touch-icon-precomposed.png">
18+
<link rel="shortcut icon" href="{{ site.baseurl }}/public/favicon.ico">
19+
<link rel="alternate" type="application/atom+xml" title="{{ site.title }}" href="{{ site.baseurl }}/atom.xml">
2920
</head>

_includes/sidebar.html

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,22 @@
1-
<div class="sidebar">
1+
{% assign homeurl = site.baseurl | append: "/" %}
2+
<aside class="sidebar">
23
<div class="container sidebar-sticky">
34
<div class="sidebar-about">
4-
<h1>
5-
<a href="{{ site.baseurl }}">
6-
{{ site.title }}
7-
</a>
8-
</h1>
5+
<h1><a href="{{ homeurl }}" title="Home">{{ site.title }}</a></h1>
96
<p class="lead">{{ site.description }}</p>
107
</div>
118

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

1512
{% comment %}
1613
The code below dynamically generates a sidebar nav of pages with
1714
`layout: page` in the front-matter. See readme for usage.
1815
{% endcomment %}
1916

20-
{% assign pages_list = site.pages %}
21-
{% for node in pages_list %}
22-
{% if node.title != null %}
23-
{% if node.layout == "page" %}
24-
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{ node.url }}">{{ node.title }}</a>
25-
{% endif %}
17+
{% for node in site.pages %}
18+
{% if node.title != null and node.layout == "page" %}
19+
<a class="sidebar-nav-item{% if page.url == node.url %} active{% endif %}" href="{{ node.url }}">{{ node.title }}</a>
2620
{% endif %}
2721
{% endfor %}
2822

@@ -31,6 +25,8 @@ <h1>
3125
<span class="sidebar-nav-item">Currently v{{ site.version }}</span>
3226
</nav>
3327

34-
<p>&copy; {{ site.time | date: '%Y' }}. All rights reserved.</p>
28+
<small>
29+
&copy; <time datetime="{{ site.time | date_to_xmlschema }}">{{ site.time | date: '%Y' }}</time>. All rights reserved.
30+
</small>
3531
</div>
36-
</div>
32+
</aside>

_layouts/default.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
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">
11-
{{ content }}
10+
<div class="container content">
11+
<main>
12+
{{ content }}
13+
</main>
1214
</div>
1315

1416
</body>

_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: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
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_to_string }}</span>
7+
<time datetime="{{ page.date | date_to_xmlschema }}" class="post-date">{{ page.date | date_to_string }}</time>
88
{{ content }}
9-
</div>
9+
</article>
1010

11-
<div class="related">
12-
<h2>Related Posts</h2>
11+
{% if site.related_posts != empty %}
12+
<aside class="related">
13+
<h3>Related posts</h3>
1314
<ul class="related-posts">
1415
{% for post in site.related_posts limit:3 %}
1516
<li>
16-
<h3>
17-
<a href="{{ post.url }}">
18-
{{ post.title }}
19-
<small>{{ post.date | date_to_string }}</small>
20-
</a>
21-
</h3>
17+
<a href="{{ site.baseurl }}{{ post.url }}">
18+
{{ post.title }}
19+
<small><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_string }}</time></small>
20+
</a>
2221
</li>
2322
{% endfor %}
2423
</ul>
25-
</div>
24+
</aside>
25+
{% endif %}

_sass/_base.scss

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Body resets
2+
//
3+
// Update the foundational and global aspects of the page.
4+
5+
* {
6+
-webkit-box-sizing: border-box;
7+
-moz-box-sizing: border-box;
8+
box-sizing: border-box;
9+
}
10+
11+
html,
12+
body {
13+
margin: 0;
14+
padding: 0;
15+
}
16+
17+
html {
18+
font-family: $root-font-family;
19+
font-size: $root-font-size;
20+
line-height: $root-line-height;
21+
22+
@media (min-width: $large-breakpoint) {
23+
font-size: $large-font-size;
24+
}
25+
}
26+
27+
body {
28+
color: $body-color;
29+
background-color: $body-bg;
30+
-webkit-text-size-adjust: 100%;
31+
-ms-text-size-adjust: 100%;
32+
}
33+
34+
// No `:visited` state is required by default (browsers will use `a`)
35+
a {
36+
color: $link-color;
37+
text-decoration: none;
38+
39+
// `:focus` is linked to `:hover` for basic accessibility
40+
&:hover,
41+
&:focus {
42+
text-decoration: underline;
43+
}
44+
45+
strong {
46+
color: inherit;
47+
}
48+
}
49+
50+
img {
51+
display: block;
52+
max-width: 100%;
53+
margin: 0 0 1rem;
54+
border-radius: 5px;
55+
}
56+
57+
table {
58+
margin-bottom: 1rem;
59+
width: 100%;
60+
font-size: 85%;
61+
border: 1px solid #e5e5e5;
62+
border-collapse: collapse;
63+
}
64+
65+
td,
66+
th {
67+
padding: .25rem .5rem;
68+
border: 1px solid #e5e5e5;
69+
}
70+
71+
th {
72+
text-align: left;
73+
}
74+
75+
tbody tr:nth-child(odd) td,
76+
tbody tr:nth-child(odd) th {
77+
background-color: #f9f9f9;
78+
}

_sass/_code.scss

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Code
2+
//
3+
// Inline and block-level code snippets. Includes tweaks to syntax highlighted
4+
// snippets from Pygments/Rouge and Gist embeds.
5+
6+
code,
7+
pre {
8+
font-family: $code-font-family;
9+
}
10+
11+
code {
12+
padding: .25em .5em;
13+
font-size: 85%;
14+
color: $code-color;
15+
background-color: #f9f9f9;
16+
border-radius: 3px;
17+
}
18+
19+
pre {
20+
margin-top: 0;
21+
margin-bottom: 1rem;
22+
}
23+
24+
pre code {
25+
padding: 0;
26+
font-size: 100%;
27+
color: inherit;
28+
background-color: transparent;
29+
}
30+
31+
// Pygments via Jekyll
32+
.highlight {
33+
padding: 1rem;
34+
margin-bottom: 1rem;
35+
font-size: .8rem;
36+
line-height: 1.4;
37+
background-color: #f9f9f9;
38+
border-radius: .25rem;
39+
40+
pre {
41+
margin-bottom: 0;
42+
overflow-x: auto;
43+
}
44+
45+
.lineno {
46+
display: inline-block; // Ensures the null space also isn't selectable
47+
padding-right: .75rem;
48+
padding-left: .25rem;
49+
color: #999;
50+
// Make sure numbers aren't selectable
51+
-webkit-user-select: none;
52+
-moz-user-select: none;
53+
user-select: none;
54+
}
55+
}
56+
57+
58+
// Gist via GitHub Pages
59+
// .gist .gist-file {
60+
// font-family: Menlo, Monaco, "Courier New", monospace !important;
61+
// }
62+
// .gist .markdown-body {
63+
// padding: 15px;
64+
// }
65+
// .gist pre {
66+
// padding: 0;
67+
// background-color: transparent;
68+
// }
69+
// .gist .gist-file .gist-data {
70+
// font-size: .8rem !important;
71+
// line-height: 1.4;
72+
// }
73+
// .gist code {
74+
// padding: 0;
75+
// color: inherit;
76+
// background-color: transparent;
77+
// border-radius: 0;
78+
// }

_sass/_layout.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Layout
2+
//
3+
// Styles for managing the structural hierarchy of the site.
4+
5+
.container {
6+
max-width: 38rem;
7+
padding-left: 1.5rem;
8+
padding-right: 1.5rem;
9+
margin-left: auto;
10+
margin-right: auto;
11+
}
12+
13+
footer {
14+
margin-bottom: 2rem;
15+
}

0 commit comments

Comments
 (0)