Skip to content

Commit

Permalink
Update layout and pages
Browse files Browse the repository at this point in the history
  • Loading branch information
brennanbrown committed Nov 13, 2020
1 parent 46026d3 commit df4609d
Show file tree
Hide file tree
Showing 21 changed files with 279 additions and 172 deletions.
3 changes: 0 additions & 3 deletions TODO.md

This file was deleted.

6 changes: 3 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
title: "Purelog: for Writers"
email: [email protected]
description: >- # this means to ignore newlines until "baseurl:"
A sidebar Jekyll theme using the Pure.css framework,
designed for writers and bloggers. Under construction.
A responsive sidebar Jekyll theme using the Pure.css framework,
designed for writers and bloggers of all kinds.
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://purelog.netlify.app" # the base hostname & protocol for your site, e.g. http://example.com
repository: brennanbrown/purelog
Expand Down Expand Up @@ -79,7 +79,7 @@ defaults:
path: ""
type: journals
values:
layout: post
layout: journal-entry
content-type: journals

# Allows all pages to be put into `_pages` folder
Expand Down
3 changes: 2 additions & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
<meta name="theme-color" content="{{ site.theme_color }}">
<link rel="archives" href="{{site.url}}/archives/">

<meta name="robots" content="index,follow"> <!-- All Search Engines -->
<meta name="robots" content="index,follow"> <!-- All Search Engines -->
<meta name="googlebot" content="index,follow"><!-- Google Specific -->

<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/grids-responsive-min.css">
<link rel="stylesheet" href="/assets/main.css">
<link rel="stylesheet" href="/assets/code.css">
<script src="https://kit.fontawesome.com/e9dddf84a6.js" crossorigin="anonymous"></script>
{%- seo -%}
{%- feed_meta -%}
Expand Down
13 changes: 13 additions & 0 deletions _includes/journal-data.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<p>
{%- if page.author -%}
{% for author in page.author %}
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">By: {{ author }}</span></span>
{%- if forloop.last == false %}, {% endif -%}
{% endfor %}
{%- endif -%}
<br />
{%- for tag in page.tags -%}
<a href="/tags/#{{ tag }}">#{{ tag }}</a> &#8239;
{%- endfor -%}
</p>
2 changes: 1 addition & 1 deletion _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2 class="brand-tagline">{{site.description}}</h2>
<a class="pure-button" href="{{site.url}}/notes">Notes</a>
</li>
<li class="nav-item">
<a class="pure-button" href="{{site.url}}/docs">Docs</a>
<a class="pure-button" href="{{site.url}}/journals">Journal</a>
</li>
</ul>
</nav>
Expand Down
23 changes: 23 additions & 0 deletions _layouts/journal-entry.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
layout: default
---

<article class="post-entry" itemscope itemtype="http://schema.org/BlogPosting">

<header class="post-header">
<h2 class="post-title" itemprop="name headline">{{ page.title | escape }}</h2>
{%- include journal-data.html -%}
</header>

<div class="post-body itemprop=" articleBody">
{{ content }}
</div>

{%- include author.html -%}

{%- if site.disqus.shortname -%}
{%- include disqus_comments.html -%}
{%- endif -%}

<a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
</article>
27 changes: 9 additions & 18 deletions _layouts/journals.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,20 @@ <h2 class="content-subhead">Recent Journals</h2>
{%- assign date_format = site.minima.date_format | default: "%B %-d, %Y" -%}

{%- for journal in journals -%}
<section class="post">
<section class="journal">
<header class="journal-header">
<h2 class="post-title">
<a href="{{ journal.url | relative_url }}">
{{ journal.title | escape }}
</a>
</h2>

<p class="post-meta">
Written:
{{ journal.date | date: date_format }}
| Tagged:
<span>
{% for tag in journal.tags %}
<a href="/tags/#{{ tag }}">#{{ tag }}</a>
{% endfor %}
</span>
</p>
<small>
<h2 class="post-title">
<a href="{{ journal.url | relative_url }}">
{{ journal.title | escape }}
</a>
</h2>
</small>
</header>

<div class="post-description">
<p>
<em>{{ journal.content | strip_html | escape | truncate: 300}}</em>
<em>{{ journal.content | escape | truncate: 300}}</em>
</p>
</div>
</section>
Expand Down
4 changes: 1 addition & 3 deletions _layouts/notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ <h2 class="post-title">
</h2>

<p class="post-meta">
Written:
{{ note.date | date: date_format }}
| Tagged:
Tagged:
<span>
{% for tag in note.tags %}
<a href="/tags/#{{ tag }}">#{{ tag }}</a>
Expand Down
3 changes: 1 addition & 2 deletions _layouts/page.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
layout: default
---
<hr class="post-hr"/>

<article class="page">
<article class="page post-entry">

<header>
<h1>{{ page.title | escape }}</h1>
Expand Down
32 changes: 0 additions & 32 deletions _pages/about.markdown

This file was deleted.

32 changes: 32 additions & 0 deletions _pages/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
layout: page
title: About the Purelog Theme
permalink: /about/
---

**Purelog** is a responsive, sidebar theme for the popular JAMstack generator Jekyll that only uses the minimal [**Pure.css** framework](https://github.com/pure-css/pure) (hence the name!), while still following the best practices possible for accessibility and search-engine optimization.

I created this after finishing [Watery](https://github.com/brennanbrown/watery) (which this theme is built off of), as a way to add more functionality and design while still remaining as lightweight as possible.

This project is aimed towards those looking for an interesting theme for Jekyll that has features that aren't found commonly elsewhere, which I'll list down below.

### Features

Here are a few interesting features of this Jekyll theme:

- A fully customizable and empty `_BLANK_config.yml` to make getting up-and-running easy.
- A speedy, on-site search function using [Simply Jekyll Search](https://github.com/christian-fei/Simple-Jekyll-Search).
- Custom collections for different types of material (note-taking, journal writing, etc.)
- An auto-generating archive page that displays all entries from _all_ collections.
- Having a `_pages` collection for easier organization.
- An author bio at the end of each post. (Located in `_inclues/author.html`)
- Full Rouge support for syntax highlighting. (Currently using `base16.solarized.light`)
- Auto-generated RSS feed, sitemap, accessibility features, and search-engine optimization.

You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/)

You can find the source code for Jekyll at GitHub:
[jekyll][jekyll-organization] /
[jekyll](https://github.com/jekyll/jekyll)

[jekyll-organization]: https://github.com/jekyll
7 changes: 5 additions & 2 deletions _pages/archive.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---
layout: page
permalink: /archive
title: Archive of All Collections
---

**Note:** This page contains all material in anything in `_posts`, as well as all custom collections, such as `_notes`, and `_journals`, etc. with the only exception being `_pages`.

{% for collection in site.collections %}
{% if collection.label != "pages" %}

<h2>Items from {{ collection.label | capitalize }}</h2>
<h2>Entries from {{ collection.label | capitalize }}</h2>
<ul>
{% for item in site[collection.label] %}
<li><a href="{{ item.url }}">{{ item.title }}</a></li>
<li class="archive-links"><a href="{{ item.url }}">{{ item.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
Expand Down
6 changes: 4 additions & 2 deletions _pages/categories/index.md → _pages/categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ content-type: eg

<main>
{% for category in site.categories %}
<h3 id="{{ category | first }}">{{ category | first | capitalize }}</h3>
<div class="pure-u-1 tags">
<h2 id="{{ category | first }}">{{ category | first }}</h2>
{% for post in category.last %}
<li id="category-content" style="padding-bottom: 0.6em; list-style: none;"><a href="{{post.url}}">{{ post.title }}</a></li>
<li id="category-content" style="padding-bottom: 0.6em;"><a href="{{post.url}}">{{ post.title }}</a></li>
{% endfor %}
</div>
{% endfor %}
<br/>
<br/>
Expand Down
File renamed without changes.
99 changes: 0 additions & 99 deletions _pages/docs.markdown

This file was deleted.

3 changes: 1 addition & 2 deletions _pages/journals.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
layout: default
permalink: /journal
layout: journals
---
2 changes: 1 addition & 1 deletion _pages/tags.markdown → _pages/tags.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: page
title: Tags
title: Organized by Tags
permalink: /tags/
content-type: eg
---
Expand Down
Loading

0 comments on commit df4609d

Please sign in to comment.