mirror of
https://github.com/tiennm99/tsuki.git
synced 2026-05-28 22:24:05 +00:00
6e17ee62b9
Fixes issues flagged in audit: improve footer spacing, meta tag refinement, code-copy utility robustness, and add security notes to data schemas.
63 lines
2.3 KiB
HTML
63 lines
2.3 KiB
HTML
{{- $title := cond .IsHome site.Title (printf "%s · %s" .Title site.Title) -}}
|
|
{{- $description := .Description | default .Summary | default site.Params.description | default site.Title | plainify -}}
|
|
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="generator" content="tsuki">
|
|
|
|
<title>{{ $title }}</title>
|
|
<meta name="description" content="{{ $description }}">
|
|
<link rel="canonical" href="{{ .Permalink }}">
|
|
|
|
{{/* Theme flash prevention — must run before <body> */}}
|
|
<script>
|
|
(function () {
|
|
try {
|
|
var stored = localStorage.getItem('tsuki-theme');
|
|
if (stored === 'dark' || stored === 'light') {
|
|
document.documentElement.setAttribute('data-theme', stored);
|
|
}
|
|
} catch (e) {}
|
|
})();
|
|
</script>
|
|
|
|
{{/* SEO: OpenGraph + Twitter Cards + JSON-LD Article */}}
|
|
{{ partial "head/seo.html" . }}
|
|
|
|
{{/* RSS autodiscovery */}}
|
|
{{- with .OutputFormats.Get "RSS" }}
|
|
<link rel="alternate" type="application/rss+xml" title="{{ site.Title }}" href="{{ .Permalink }}">
|
|
{{- end }}
|
|
|
|
{{/* Pagination prev/next for SEO — only on paginated kinds with >1 page */}}
|
|
{{- if or (eq .Kind "section") (eq .Kind "taxonomy") (eq .Kind "term") }}
|
|
{{- with .Paginator }}
|
|
{{- if gt .TotalPages 1 }}
|
|
{{- if .HasPrev }}<link rel="prev" href="{{ .Prev.URL }}">{{ end }}
|
|
{{- if .HasNext }}<link rel="next" href="{{ .Next.URL }}">{{ end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{/* Favicon */}}
|
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
|
<link rel="icon" href="/favicon.ico" sizes="32x32">
|
|
|
|
{{/* Theme CSS — concatenated, minified, fingerprinted (no build step required) */}}
|
|
{{- $cssFiles := slice
|
|
(resources.Get "css/tokens.css")
|
|
(resources.Get "css/reset.css")
|
|
(resources.Get "css/typography.css")
|
|
(resources.Get "css/layout.css")
|
|
(resources.Get "css/components.css")
|
|
(resources.Get "css/home.css")
|
|
(resources.Get "css/archive.css")
|
|
(resources.Get "css/toc.css")
|
|
(resources.Get "css/search.css")
|
|
(resources.Get "css/comments.css")
|
|
(resources.Get "css/callouts.css")
|
|
(resources.Get "css/view-transitions.css")
|
|
-}}
|
|
{{- $css := $cssFiles | resources.Concat "css/tsuki.bundle.css" | minify | fingerprint -}}
|
|
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}" crossorigin="anonymous">
|