Fixed some bugs for publishing a first site

This commit is contained in:
Leon Mika 2026-02-18 22:38:05 +11:00
parent 77d3ff4852
commit 3591e0c723
12 changed files with 86 additions and 30 deletions

View file

@ -3,19 +3,21 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My New Website</title>
<title>{{ .Site.Title }}</title>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
</head>
<body>
<header>
<h1>Hello, world</h1>
<p>Welcome to my website!</p>
<h1>{{ .Site.Title }}</h1>
<p>{{ .Site.Tagline }}</p>
</header>
{{ .Body }}
<main>
{{ .Body }}
</main>
<footer>
<p>Test stuff</p>
<p>This site under construction.</p>
</footer>
</body>
</html>

View file

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

View file

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