Create thoughts collection page
This commit is contained in:
parent
f91f6bb36c
commit
b8aa907ac8
3 changed files with 35 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
||||||
<nav>
|
<nav>
|
||||||
<a href="/" {% if page == 'home' -%}class="current"{%- endif -%}>Home</a>
|
<a href="/" {% if page == 'home' -%}class="current"{%- endif -%}>Home</a>
|
||||||
{# <a href="#" {% if page == 'essays' -%}class="current"{%- endif -%}>Essays</a> #}
|
{# <a href="#" {% if page == 'essays' -%}class="current"{%- endif -%}>Essays</a> #}
|
||||||
<a href="#" {% if page == 'thoughts' -%}class="current"{%- endif -%}>Thoughts</a>
|
<a href="/thoughts" {% if page == 'thoughts' -%}class="current"{%- endif -%}>Thoughts</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
33
src/thoughts.njk
Normal file
33
src/thoughts.njk
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{% extends "base.njk" %}
|
||||||
|
|
||||||
|
{%- block title -%}
|
||||||
|
<title>Z. Charles Dziura | Weblog</title>
|
||||||
|
{%- endblock -%}
|
||||||
|
|
||||||
|
{%- block body -%}
|
||||||
|
{%- import "header.njk" as header -%}
|
||||||
|
|
||||||
|
{{ header.header(page='thoughts') }}
|
||||||
|
|
||||||
|
<main>
|
||||||
|
{%- for post in collections.thoughts | reverse -%}
|
||||||
|
{%- if post.data.type == "thought" -%}
|
||||||
|
<section class="thought">
|
||||||
|
<header>
|
||||||
|
<img class="hash" src="/assets/hash.svg" type="image/svg+xml">
|
||||||
|
<span>An errant thought...</span>
|
||||||
|
<a href="{{ post.url }}" class="link">
|
||||||
|
<img src="/assets/link.svg" type="image/svg+xml">
|
||||||
|
</a>
|
||||||
|
</header>
|
||||||
|
<div class="content">
|
||||||
|
{{ post.content | safe }}
|
||||||
|
</div>
|
||||||
|
<footer>
|
||||||
|
Posted on {{ post.date | formatDate }}
|
||||||
|
</footer>
|
||||||
|
</section>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
</main>
|
||||||
|
{%- endblock -%}
|
|
@ -2,6 +2,7 @@ import { DateTime } from 'luxon';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
date: 'git Created',
|
date: 'git Created',
|
||||||
|
tags: 'thoughts',
|
||||||
type: 'thought',
|
type: 'thought',
|
||||||
layout: 'thought.njk',
|
layout: 'thought.njk',
|
||||||
permalink: function ({ page }) {
|
permalink: function ({ page }) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue