Skip to content

Commit

Permalink
Need to add author pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasvaeth committed Nov 25, 2017
1 parent c471c4a commit c34befb
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 62 deletions.
56 changes: 7 additions & 49 deletions 404.html
Original file line number Diff line number Diff line change
@@ -1,55 +1,13 @@
---
layout: default
---
<!--
This error template is used for all 404 errors, which might occur on your site.
It's a good idea to keep this template as minimal as possible in terms of both file size and complexity.
-->

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>{{ site.title }}</title>

<link rel="icon" type="image/x-icon" href="{{ '/assets/images/favicon.ico' | prepend: site.baseurl }}">

<link rel="stylesheet" href="{{ '/assets/css/app.min.css' | prepend: site.baseurl }}">
</head>
<body class="error-template">
{% include header.html %}

<main class="💈">
<section class="mast section-padding">
<div class="grid-small">
<h2>404</h2>
<p class="mast__text">This page does not exist.</p>
</div>
</section>
</main>

<footer class="footer section-padding">
<div class="grid">
{{#if @labs.subscribers}}
<div class="subscribe" id="subscribe">
<div class="subscribe__container">
<span class="subscribe__title">Subscribe</span>
<p class="subscribe__text">Get a weekly email of posts I’ve added to the site.</p>
{{subscribe_form placeholder="Email Address"}}
</div>
</div>

<hr class="sep"/>
{{/if}}

<div class="footer__container">
{% tags_list :threshold => 1, :sort_by => count, :order_by => desc, :limit => 5 %}

{% include social.html %}
</div>
</div>
</footer>
</body>
</html>
<section class="mast section-padding--double">
<div class="grid-small">
<h2>404</h2>
<p class="mast__text">This page does not exist.</p>
</div>
</section>
2 changes: 1 addition & 1 deletion _assets/scss/tools/_config.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $font: "Roboto", sans-serif;
//----------------------------------------------
// Fonts: Lineheight
//----------------------------------------------
$base-lineheight: 1.8;
$base-lineheight: 1.6;

//----------------------------------------------
// Fonts: Size variables
Expand Down
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ social:
github: https://github.com/samesies
codepen: https://codepen.io/thomasvaeth/

# Author settings
author:
Thomas Vaeth: >
Thomas Vaeth was born in New York, raised in Pennsylvania, and transplanted in Washington. He was a Web Developer at Urban Influence, but now he's a Software Engineer at Getty Images.
# Build settings
markdown: kramdown
permalink: /:year/:month/:day/:title/
Expand Down
16 changes: 9 additions & 7 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h2>{{ page.title }}</h2>
</div>

<!-- Everything inside the #author tags pulls data from the author -->
{{#author}}
{% if page.author %}
<div class="section-padding--none">
<div class="grid">
<hr class="sep"/>
Expand All @@ -39,21 +39,23 @@ <h2>{{ page.title }}</h2>

<div class="section-padding">
<div class="grid-small">
<span class="post__author">Posted by <a href="{{url}}" title="More By {{name}}">{{name}}</a></span>
{{#if bio}}
<p class="post__bio">{{bio}}</p>
{{/if}}
<span class="post__author">Posted by <a href="{{url}}" title="More By {{ page.author }}">{{ page.author }}</a></span>
{% for author in site.author %}
{% if author[0] == page.author %}
<p class="post__bio">{{ author[1] }}</p>
{% endif %}
{% endfor %}
</div>
</div>
{{/author}}
{% endif %}

{% include disqus.html %}

</article>
</div>

<!-- Links to Previous/Next posts -->
{% if content and page.related %}
{% if page.related %}
<section class="related section-padding">
<div class="grid-xlarge">
<h2 class="related__title">Related</h2>
Expand Down
7 changes: 6 additions & 1 deletion _layouts/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
---
<section class="mast section-padding--double">
<div class="grid">
<h2>{{ page.tag | capitalize }}</h2>
<h2>
{% assign words = page.tag | split: ' ' %}
{% for word in words %}
{{ word | capitalize | replace: 'The', 'the' }}
{% endfor %}
</h2>
</div>
</section>

Expand Down
2 changes: 1 addition & 1 deletion _plugins/tags_pagination.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def paginate(site, tag)

(1..num_pages).each do |page|
pager = TagPager.new(site, page, tag_posts, tag, num_pages)
dir = File.join('tag', tag, page > 1 ? "page/#{page}" : '')
dir = File.join('tag', tag.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, ''), page > 1 ? "page/#{page}" : '')
page = TagPage.new(site, site.source, dir, tag)
page.pager = pager
site.pages << page
Expand Down
2 changes: 1 addition & 1 deletion _posts/2017-10-08-brunch-swag.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Brunch Swag"
date: 2017-10-08
description:
image: /assets/images/placeholder-15.jpg
author:
author: Thomas Vaeth
tags:
related:
---
Expand Down
2 changes: 1 addition & 1 deletion assets/css/amp.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/app.min.css

Large diffs are not rendered by default.

0 comments on commit c34befb

Please sign in to comment.