diff options
-rw-r--r-- | layouts/posts/list.html | 6 | ||||
-rw-r--r-- | layouts/posts/single.html | 22 |
2 files changed, 16 insertions, 12 deletions
diff --git a/layouts/posts/list.html b/layouts/posts/list.html index ad941bd..3a3eb97 100644 --- a/layouts/posts/list.html +++ b/layouts/posts/list.html @@ -2,13 +2,15 @@ {{ $dateFormat := default "January 2, 2006" .Site.Params.BookDateFormat }} {{ $paginator := .Paginate (where .Pages "Params.hidden" "ne" true) }} {{ range sort .Paginator.Pages }} - <article class="markdown"> + <article class="markdown book-post"> <h2> <a href="{{ .RelPermalink }}">{{ .Title }}</a> </h2> + {{ with .Date }} <h5> - <strong>{{ .Date.Format $dateFormat }}</strong> + <strong>{{ .Format $dateFormat }}</strong> </h5> + {{ end }} <p> {{- .Summary -}} {{ if .Truncated }} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 61c2130..69352cd 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -1,14 +1,16 @@ {{ define "main" }} -{{ $dateFormat := default "January 2, 2006" .Site.Params.BookDateFormat }} -<header class="markdown"> - <h1>{{ .Title }}</h1> - <h5> - <strong>{{ .Date.Format $dateFormat }}</strong> - </h5> -</header> -<article class="markdown"> - {{- .Content -}} -</article> + {{ $dateFormat := default "January 2, 2006" .Site.Params.BookDateFormat }} + <header class="markdown"> + <h1>{{ .Title }}</h1> + {{ with .Date }} + <h5> + <strong>{{ .Format $dateFormat }}</strong> + </h5> + {{ end }} + </header> + <article class="markdown"> + {{- .Content -}} + </article> {{ end }} {{ define "toc" }} |