summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Carpenter <53hornet@gmail.com>2019-04-28 19:28:14 -0400
committerAdam Carpenter <53hornet@gmail.com>2019-04-28 19:28:14 -0400
commit47b4026485c89a23c48a9012593cff84f75e7b55 (patch)
treeaefb1b4ff65ed68319a3553004ac929b82478cb1
parentb293b709cba60ee827697928595e1b65ce96f1e3 (diff)
downloadcobalt-site-47b4026485c89a23c48a9012593cff84f75e7b55.tar.xz
cobalt-site-47b4026485c89a23c48a9012593cff84f75e7b55.zip
More sensible post organization and TOC.
-rw-r--r--_defaults/posts.md1
-rw-r--r--_includes/toc.liquid20
-rw-r--r--_layouts/page.liquid4
-rw-r--r--_layouts/post.liquid38
-rw-r--r--pages/auto.md3
-rw-r--r--posts/2019-04-06-why-have-a-website-in-2019.md (renamed from posts/2019-04-06-why-have-a-web-site-in-2019.md)7
6 files changed, 45 insertions, 28 deletions
diff --git a/_defaults/posts.md b/_defaults/posts.md
index 9b8659c..90973a9 100644
--- a/_defaults/posts.md
+++ b/_defaults/posts.md
@@ -5,5 +5,6 @@ layout: post.liquid
title: New Post
tags: []
categories: []
+permalink: "/posts/{{categories}}/{{slug}}"
---
Start writing already...
diff --git a/_includes/toc.liquid b/_includes/toc.liquid
index 7e43a04..58f1815 100644
--- a/_includes/toc.liquid
+++ b/_includes/toc.liquid
@@ -6,15 +6,17 @@
</p>
<ul class="menu-list">
- <li>
- {% for post in collections.posts.pages %}
- {% if post.categories contains page.title %}
- <a href="{{ post.permalink }}">
- {{ post.title }}
- </a>
- {% endif %}
- {% endfor %}
- </li>
+ {% assign title = page.title | downcase %}
+
+ {% for post in collections.posts.pages %}
+ {% if post.categories contains title%}
+ <li>
+ <a href="{{ post.permalink }}">
+ {{ post.title }}
+ </a>
+ </li>
+ {% endif %}
+ {% endfor %}
</ul>
</aside>
</div>
diff --git a/_layouts/page.liquid b/_layouts/page.liquid
index 101ebc2..9a728d1 100644
--- a/_layouts/page.liquid
+++ b/_layouts/page.liquid
@@ -35,7 +35,9 @@
<div class="columns">
<div class="column">
- {{ page.content }}
+ <div class="content">
+ {{ page.content }}
+ </div>
</div>
<div class="column is-narrow">
diff --git a/_layouts/post.liquid b/_layouts/post.liquid
index 382f17d..777f455 100644
--- a/_layouts/post.liquid
+++ b/_layouts/post.liquid
@@ -25,25 +25,35 @@
</h1>
<h2 class="subtitle">
- {{ page.published_date | date: "%A, %b %e, %Y" }}
+ {% if page.published_date %}
+ {{ page.published_date | date: "%A, %b %e, %Y" }}
+ {% else %}
+ Unpublished!
+ {% endif %}
</h2>
<!-- end title and date -->
<!-- begin categories and tags -->
{% if page.categories %}
- {% for category in page.categories %}
- <span class="tag">
- {{ category | downcase }}
- </span>
- {% endfor %}
+ <p>
+ Categories:
+ {% for category in page.categories %}
+ <span class="tag">
+ {{ category | downcase }}
+ </span>
+ {% endfor %}
+ </p>
{% endif %}
{% if page.tags %}
- {% for tag in page.tags %}
- <span class="tag">
- {{ tag | downcase }}
- </span>
- {% endfor %}
+ <p>
+ Tags:
+ {% for tag in page.tags %}
+ <span class="tag">
+ #{{ tag | downcase }}
+ </span>
+ {% endfor %}
+ </p>
{% endif %}
<!-- end categories and tags -->
@@ -57,8 +67,10 @@
<!-- begin main content -->
<section class="section">
<div class="container is-fluid">
- <div class="content">
- {{ page.content }}
+ <div class="columns">
+ <div class="content">
+ {{ page.content }}
+ </div>
</div>
</div>
</section>
diff --git a/pages/auto.md b/pages/auto.md
index 367bff2..20a6811 100644
--- a/pages/auto.md
+++ b/pages/auto.md
@@ -3,5 +3,4 @@ title: Automotive
layout: page.liquid
permalink: "/{{slug}}"
---
-
-More to come soon!
+# Below are all of the posts in the "automotive" category
diff --git a/posts/2019-04-06-why-have-a-web-site-in-2019.md b/posts/2019-04-06-why-have-a-website-in-2019.md
index 83d02f1..2892dd4 100644
--- a/posts/2019-04-06-why-have-a-web-site-in-2019.md
+++ b/posts/2019-04-06-why-have-a-website-in-2019.md
@@ -1,13 +1,14 @@
---
-title: Why Have a Web Site in 2019?
+permalink: "/posts/{{categories}}/{{slug}}"
+title: Why Have a Website in 2019?
categories:
- - Technology
+ - technology
tags:
- website
- self-hosted
- blog
- online presence
-published_date: "2019-04-06 15:12:16 +0000"
+published_date: "2019-04-06 20:50:19 +0000"
layout: post.liquid
is_draft: false
---