feat: Add notes as post type

This commit is contained in:
2025-12-14 21:02:46 +01:00
parent 0216cd961a
commit 3f29069c91
3 changed files with 88 additions and 55 deletions

View File

@@ -42,15 +42,16 @@ preserveTaxonomyNames = true
oxitraffic_url = "https://traffic.hyteck.de/count.js"
# Nav links in the side bar
[[menu.main]]
name = "Home"
url = "/"
name = "Notes"
url = "notes/"
weight = 1
[[menu.main]]
name = "Services"
url = "services/"
weight = 3
weight = 2
[[menu.main]]
name = "About"

6
content/notes/_index.md Normal file
View File

@@ -0,0 +1,6 @@
---
title: "Notes"
---
My notes are mainly a store of information for my future self. Here you find titbits of information, small HowTos and
such. Do not expect the quality of a blogpost for these.

26
layouts/notes/list.html Normal file
View File

@@ -0,0 +1,26 @@
{{ define "main" }}
<h1 style="color: whitesmoke">Notes</h1>
<div style="color: whitesmoke;">
{{ .Content }}
</div>
<ul style="list-style-type:none">
{{ if (.Pages.ByDate.Reverse) }}
{{ range .Pages.ByDate.Reverse }}
<li class="block">
<h2>
<a href="{{ .Permalink }} " style="color: whitesmoke;"> {{ .Title }} </a>
</h2>
<small style="color: whitesmoke;">{{ .Date.Format "2006-01-02" }}</small>
{{ if .Params.subtitle }}
<p style="color: whitesmoke">{{ .Params.subtitle }}</p>
{{ end }}
</li>
{{ end }}
{{ else }}
No notes found.
{{ end }}
</ul>
{{ end }}