chore: update permalink configuration and content organization

Modified hugo.toml to use section in post front-matter for permalinks

Updated layouts/_default/single.html to handle posts without categories

Modified scripts/generate-content.js to organize content by category

Deleted content/_index.md and added new category directories
This commit is contained in:
kbe
2025-08-18 16:39:27 +02:00
parent 34084f1481
commit 710e63afda
266 changed files with 21494 additions and 27 deletions

View File

@@ -0,0 +1,31 @@
{{ define "main" }}
<article class="post">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
<div class="post-meta">
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time>
{{ if .Params.author }}
<span class="post-author">{{ .Params.author.name }}</span>
{{ end }}
<div class="post-categories">
<a href="/categories/general" class="category">General</a>
</div>
</div>
{{ if .Params.featured_image }}
<img src="{{ .Params.featured_image }}" alt="{{ .Title }}" class="featured-image">
{{ end }}
</header>
<div class="post-content">
{{ .Content }}
</div>
{{ if .Params.tags }}
<div class="post-tags">
{{ range .Params.tags }}
<a href="/tags/{{ .slug }}" class="tag">#{{ .name }}</a>
{{ end }}
</div>
{{ end }}
</article>
{{ end }}

View File

@@ -1,4 +1,6 @@
{{ define "main" }}
{{ if .Params.categories }}
<article class="post">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
@@ -7,13 +9,11 @@
{{ if .Params.author }}
<span class="post-author">{{ .Params.author.name }}</span>
{{ end }}
{{ if .Params.categories }}
<div class="post-categories">
{{ range .Params.categories }}
<a href="/categories/{{ .slug }}" class="category">{{ .name }}</a>
{{ end }}
</div>
{{ end }}
<div class="post-categories">
{{ range .Params.categories }}
<a href="/categories/{{ .slug }}" class="category">{{ .name }}</a>
{{ end }}
</div>
</div>
{{ if .Params.featured_image }}
<img src="{{ .Params.featured_image }}" alt="{{ .Title }}" class="featured-image">
@@ -32,4 +32,7 @@
</div>
{{ end }}
</article>
{{ else }}
{{ partial "no-category.html" . }}
{{ end }}
{{ end }}