Modified models to support a DB

This commit is contained in:
Leon Mika 2026-02-19 21:21:27 +11:00
parent 3591e0c723
commit ebaec3d296
33 changed files with 675 additions and 64 deletions

6
layouts/simplecss/fs.go Normal file
View file

@ -0,0 +1,6 @@
package simplecss
import "embed"
//go:embed *.html
var FS embed.FS

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ .Site.Title }}</title>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
</head>
<body>
<header>
<h1>{{ .Site.Title }}</h1>
<p>{{ .Site.Tagline }}</p>
</header>
<main>
{{ .Body }}
</main>
<footer>
<p>This site under construction.</p>
</footer>
</body>
</html>

View file

@ -0,0 +1,5 @@
{{ range .Posts }}
{{ if .Meta.Title }}<h3>{{ .Meta.Title }}</h3>{{ end }}
{{ .HTML }}
<a href="{{ url_abs .Path }}">{{ format_date .Meta.Date }}</a>
{{ end }}

View file

@ -0,0 +1,3 @@
{{ if .Meta.Title }}<h3>{{ .Meta.Title }}</h3>{{ end }}
{{ .HTML }}
<a href="{{ url_abs .Path }}">{{ format_date .Meta.Date }}</a>