Moving all the theme files out of the theme directory

This commit is contained in:
Dan 2025-12-08 13:52:23 +00:00
parent 23369f4ace
commit 3006bff575
40 changed files with 477 additions and 11 deletions

23
layouts/post/list.html Normal file
View file

@ -0,0 +1,23 @@
{{ define "main" }}
{{/*
This template is the same as the default and is here to demonstrate that if you have a content directory called "post"
you can create a layouts directory, just for that section.
*/}}
<article>
<section>
{{ .Content }}
</section>
<aside>
{{ range .Paginator.Pages }}
<div>
{{/*
Note we can use `.Render` here for items just in this section, instead of a partial to pull in items for the list
page. https://gohugo.io/functions/render/
*/}}
{{ .Render "summary" }}
</div>
{{ end }}
</aside>
{{ template "_internal/pagination.html" . }}
</article>
{{ end }}

15
layouts/post/summary.html Normal file
View file

@ -0,0 +1,15 @@
<div>
{{ if .Date }}
<div>
{{ .Date.Format "January 2, 2006" }}
</div>
{{ end }}
<h1>
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
</h1>
<div>
{{ .Summary }}
</div>
</div>