Clean up and improve some layouts
Adds tags and category shows to single pages. Adds dates to list pages.
This commit is contained in:
parent
9cc66e83af
commit
5da2f358e9
4 changed files with 26 additions and 6 deletions
|
@ -2,7 +2,8 @@
|
||||||
title = 'Hello World'
|
title = 'Hello World'
|
||||||
date = 2024-08-01T04:21:56+01:00
|
date = 2024-08-01T04:21:56+01:00
|
||||||
author = 'Ethan Marshall'
|
author = 'Ethan Marshall'
|
||||||
draft = false
|
categories = ['tech']
|
||||||
|
tags = ['personal', 'web']
|
||||||
+++
|
+++
|
||||||
|
|
||||||
Hello, world! This is my first testing post to see if this system will work. Nothing to see here!
|
Hello, world! This is my first testing post to see if this system will work. Nothing to see here!
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
{{ .Render "li" }}
|
<li><a href="{{ .Permalink }}">{{ .Title }}</a> -- {{ .Date.Format "2 January 2006" }}</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,29 @@
|
||||||
|
|
||||||
{{define "aside" }}
|
{{define "aside" }}
|
||||||
{{ if .Params.description }}<p>{{ .Params.description }}</p>{{ end }}
|
{{ if .Params.description }}<p>{{ .Params.description }}</p>{{ end }}
|
||||||
{{ if or (.Params.author) (.Params.date) }}
|
{{ if .Params.date }}
|
||||||
<p>
|
<p>
|
||||||
{{ if .Params.author }}By {{ .Params.author }}{{ if .Date }}, {{ end }}{{ end }}
|
{{ if .Date }}<strong>First Published</strong> {{ .Date.Format "2006-01-02" }}{{ end }}
|
||||||
{{ if .Date }}{{ .Date.Format "2006-01-02" }}{{ end }}
|
</p>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{if .Params.categories }}
|
||||||
|
<p>
|
||||||
|
<strong>Categories: [</strong>
|
||||||
|
{{ range .Params.categories }}
|
||||||
|
<a href="/categories/{{ . }}">{{ . }}</a>
|
||||||
|
{{ end }}
|
||||||
|
<strong>]</strong>
|
||||||
|
</p>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{if .Params.tags }}
|
||||||
|
<p>
|
||||||
|
<strong>Tags: [</strong>
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
<a href="/tags/{{ . }}">{{ . }}</a>
|
||||||
|
{{ end }}
|
||||||
|
<strong>]</strong>
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
<article class="post">
|
<article class="post">
|
||||||
<header class="post__header">
|
<header class="post__header">
|
||||||
<h1><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> - {{ .Date.Format "2 January 2006" }}</h1>
|
<h1><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> -- {{ .Date.Format "2 January 2006" }}</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section class="post__summary">
|
<section class="post__summary">
|
||||||
|
|
Loading…
Reference in a new issue