chore: allowlist trusted plugins

This commit is contained in:
Chen Gu
2026-08-13 17:00:21 +08:00
committed by Chen Gu
parent 8027f1186d
commit 319e8a7ec9
66 changed files with 6229 additions and 124 deletions
@@ -4,10 +4,25 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{ if .Title }}{{ .Title }} · {{ end }}{{ .Site.Title }}</title>
<link rel="stylesheet" href="/css/main.css" />
<meta name="description" content="{{ .Site.Params.description }}" />
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}" />
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🜁</text></svg>" />
</head>
<body>
<header><h1><a href="/">{{ .Site.Title }}</a></h1></header>
<main>{{ block "main" . }}{{ end }}</main>
<header>
<div class="nav-container">
<h1><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></h1>
<nav>
<a href="{{ "" | absURL }}">首页</a>
<a href="{{ "journey" | absURL }}">旅程</a>
</nav>
</div>
</header>
<main>
{{ block "main" . }}{{ end }}
</main>
<footer>
<p>由 Val 记录 · 使用 Hugo 构建</p>
</footer>
</body>
</html>
@@ -0,0 +1,29 @@
{{ define "main" }}
<h1 class="section-title" style="font-size: 1.25rem; margin-bottom: var(--space-xl);">{{ .Title }}</h1>
{{ $journeys := .Pages }}
{{ if $journeys }}
<ul class="journey-list">
{{ range $journeys }}
<li>
<a href="{{ .RelPermalink }}" class="journey-card">
<h3 class="journey-card-title">{{ .Title }}</h3>
<div class="journey-card-meta">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05" }}">{{ .Date.Format "2006-01-02" }}</time>
{{ with .Params.tags }}
<span>·</span>
<span>{{ delimit . " · " }}</span>
{{ end }}
</div>
</a>
</li>
{{ end }}
</ul>
{{ else }}
<div class="empty-state">
<div class="empty-state-icon">🌙</div>
<p>还没有记录任何旅程</p>
<p style="font-size: 0.875rem; margin-top: var(--space-sm);">等待第一颗星星升起...</p>
</div>
{{ end }}
{{ end }}
@@ -1,7 +1,24 @@
{{ define "main" }}
<article>
<h2>{{ .Title }}</h2>
<p><small>{{ .Date.Format "2006-01-02 15:04" }}</small></p>
<header>
<h1>{{ .Title }}</h1>
<div class="post-meta">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05" }}">{{ .Date.Format "2006年01月02日" }}</time>
{{ with .Params.categories }}
<span>·</span>
<span>{{ delimit . " / " }}</span>
{{ end }}
</div>
</header>
{{ .Content }}
{{ with .Params.tags }}
<div class="tag-list">
{{ range . }}
<span class="tag">{{ . }}</span>
{{ end }}
</div>
{{ end }}
</article>
{{ end }}
+29 -5
View File
@@ -1,9 +1,33 @@
{{ define "main" }}
<p>{{ .Site.Params.description }}</p>
<h2>最新旅程</h2>
<ul>
{{ range first 10 (where .Site.RegularPages "Section" "journey") }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> <small>{{ .Date.Format "2006-01-02" }}</small></li>
{{ with .Site.Params.description }}
<p class="hero-desc">{{ . }}</p>
{{ end }}
<h2 class="section-title">最新旅程</h2>
{{ $journeys := where .Site.RegularPages "Section" "journey" }}
{{ if $journeys }}
<ul class="journey-list">
{{ range first 10 $journeys }}
<li>
<a href="{{ .RelPermalink }}" class="journey-card">
<h3 class="journey-card-title">{{ .Title }}</h3>
<div class="journey-card-meta">
<time datetime="{{ .Date.Format "2006-01-02T15:04:05" }}">{{ .Date.Format "2006-01-02" }}</time>
{{ with .Params.tags }}
<span>·</span>
<span>{{ delimit . " · " }}</span>
{{ end }}
</div>
</a>
</li>
{{ end }}
</ul>
{{ else }}
<div class="empty-state">
<div class="empty-state-icon">🌙</div>
<p>还没有记录任何旅程</p>
<p style="font-size: 0.875rem; margin-top: var(--space-sm);">等待第一颗星星升起...</p>
</div>
{{ end }}
{{ end }}