aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/mypaper/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'themes/mypaper/layouts')
-rw-r--r--themes/mypaper/layouts/_default/list.html4
-rw-r--r--themes/mypaper/layouts/_default/single.html20
2 files changed, 19 insertions, 5 deletions
diff --git a/themes/mypaper/layouts/_default/list.html b/themes/mypaper/layouts/_default/list.html
index 4840732..053951f 100644
--- a/themes/mypaper/layouts/_default/list.html
+++ b/themes/mypaper/layouts/_default/list.html
@@ -21,7 +21,9 @@
<p>{{ .Summary | plainify | htmlUnescape }}</p>
</section>
<footer class="entry-footer">
- <time>{{ .Date.Format "2006-01-02" }}</time>
+ {{- $date := .Date.Format "2006-01-02" }}
+ {{- $lastmod := .Lastmod.Format "2006-01-02" }}
+ Posted on <time>{{ $date }}</time>{{ if ne $date $lastmod }}, updated on <time>{{ $lastmod }}</time>{{ end }}
</footer>
<a class="entry-link" href="{{ .Permalink }}"></a>
</article>
diff --git a/themes/mypaper/layouts/_default/single.html b/themes/mypaper/layouts/_default/single.html
index 918a3c8..71c6481 100644
--- a/themes/mypaper/layouts/_default/single.html
+++ b/themes/mypaper/layouts/_default/single.html
@@ -4,9 +4,9 @@
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
<div class="post-meta">
- {{- if or .Params.Author .Site.Author.name }}
- {{- .Params.Author | default .Site.Author.name }} · {{ end }}
- {{- .Date.Format "2006-01-02" -}}
+ {{- $date := .Date.Format "2006-01-02" }}
+ {{- $lastmod := .Lastmod.Format "2006-01-02" }}
+ Posted on <time>{{ $date }}</time>{{ if ne $date $lastmod }}, updated on <time>{{ $lastmod }}</time>{{ end }}
</div>
{{- if .Params.tags }}
<ul class="post-tags">
@@ -17,7 +17,19 @@
</ul>
{{- end }}
</header>
- <div class="post-content">{{ .Content }}</div>
+ <div class="post-content">
+ {{- if .Params.changelog }}
+ <section>
+ <h1>更新履歴</h1>
+ <ul>
+ {{- range $date, $remark := .Params.changelog }}
+ <li>{{ $date }}: {{ $remark }}</li>
+ {{- end }}
+ </ul>
+ </section>
+ {{- end }}
+ {{ .Content }}
+ </div>
</article>
{{- partial "footer.html" . }}