This commit is contained in:
2026-03-25 15:14:49 +09:00
commit 266e0b0cf9
84 changed files with 4624 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
{{ define "main" }}
{{- partial "nav.html" . -}}
<div class="home">
<h1>404</h1>
<p>Page not found.</p>
</div>
{{ end }}

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="{{ with .Language }}{{ .Lang }}{{ else }}en{{ end }}">
<head>
{{- partial "head.html" . -}}
{{- block "head" . }}{{ end -}}
</head>
<body>
{{- block "main" . }}{{ end -}}
</body>
</html>

View File

@@ -0,0 +1,17 @@
{{ define "main" }}
{{- partial "nav.html" . -}}
{{ $pages := union .RegularPages .Sections }}
<div class="post-list">
<h1>{{ with .Title }}{{ . }}{{ else }}{{ .Section }}{{ end }}</h1>
<ul>
{{ range $pages }}
<li>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
{{ if gt .Date.Year 2000 }}<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>{{ end }}
</li>
{{ end }}
</ul>
</div>
{{ end }}

View File

@@ -0,0 +1,16 @@
{{ define "head" }}
{{- partial "katex.html" . -}}
{{ end }}
{{ define "main" }}
{{- partial "nav.html" . -}}
<article>
<header>
<h1>{{ .Title }}</h1>
{{ if gt .Date.Year 2000 }}<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>{{ end }}
</header>
<div class="post-content">
{{ .Content }}
</div>
</article>
{{ end }}

View File

@@ -0,0 +1,11 @@
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{- range .Data.Pages }}
{{- if gt .Date.Year 2000 }}
<url>
<loc>{{ .Permalink }}</loc>
<lastmod>{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}</lastmod>
</url>
{{- end }}
{{- end }}
</urlset>

View File

@@ -0,0 +1,11 @@
{{ define "main" }}
<div class="home">
<h1>{{ .Site.Params.author }}</h1>
{{ with .Site.Params.description }}<p class="desc">{{ . }}</p>{{ end }}
<ul>
{{ range .Site.Params.homeLinks }}
<li><a href="{{ .url }}">{{ .label }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}

View File

@@ -0,0 +1,34 @@
{{- $title := .Site.Title -}}
{{- $desc := .Site.Params.description -}}
{{- if and .Title (not .IsHome) -}}
{{- $title = printf "%s | %s" .Title .Site.Title -}}
{{- end -}}
{{- with .Description }}{{ $desc = . }}{{ end -}}
{{- if and (not .Description) .IsPage }}{{ with .Summary }}{{ $desc = . | plainify | truncate 160 }}{{ end }}{{ end -}}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/favicon.ico">
<link rel="stylesheet" href="/css/main.css">
<title>{{ $title }}</title>
<meta name="description" content="{{ $desc }}">
<meta name="author" content="{{ .Site.Params.author }}">
<link rel="canonical" href="{{ .Permalink }}">
{{/* Open Graph */}}
<meta property="og:title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}">
<meta property="og:description" content="{{ $desc }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:site_name" content="{{ .Site.Title }}">
{{ if .IsPage -}}
<meta property="og:type" content="article">
{{ with .Date }}<meta property="article:published_time" content="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ end }}
{{ with .Lastmod }}<meta property="article:modified_time" content="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ end }}
{{- else -}}
<meta property="og:type" content="website">
{{- end }}
{{/* Twitter */}}
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}">
<meta name="twitter:description" content="{{ $desc }}">

View File

@@ -0,0 +1,12 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/katex.min.css" integrity="sha384-wcIxkf4k558AjM3Yz3BBFQUbk/zgIYC2R0QpeeYb+TwlBVMrlgLqwRjRtGZiK7ww" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/katex.min.js" integrity="sha384-hIoBPJpTUs74ddyc4bFZSM1TVlQDA60VBbJS0oA934VSz82sBx1X7kSx2ATBDIyd" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/contrib/auto-render.min.js" integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk" crossorigin="anonymous"
onload="renderMathInElement(document.body, {
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '\\(', right: '\\)', display: false},
{left: '\\[', right: '\\]', display: true}
],
throwOnError: false
});"></script>

View File

@@ -0,0 +1,8 @@
{{ $parent := .Parent }}
<nav class="site-nav">
{{ if and $parent (not $parent.IsHome) }}
<a href="{{ $parent.RelPermalink }}">&larr; {{ with $parent.Title }}{{ . }}{{ else }}{{ $parent.Section }}{{ end }}</a>
{{ else }}
<a href="/">&larr; home</a>
{{ end }}
</nav>