init: hugo site with mytheme

This commit is contained in:
Ubuntu
2026-04-13 13:51:02 +08:00
commit e9b2dca47b
30 changed files with 287 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{{ define "main" }}
<div class="home-hero">
<h1>{{ .Site.Title }}</h1>
<p class="hero-sub">{{ .Site.Params.subtitle }}</p>
</div>
<div class="post-list">
{{ range first 10 (where .Site.RegularPages "Type" "posts") }}
<div class="post-card">
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
<div class="post-meta">{{ .Date.Format "2006-01-02" }}{{ with .Params.categories }} · {{ . }}{{ end }}</div>
<p class="post-summary">{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}</p>
</div>
{{ end }}
</div>
{{ end }}