diff options
Diffstat (limited to 'weblog/index.html.tmpl')
| -rw-r--r-- | weblog/index.html.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weblog/index.html.tmpl b/weblog/index.html.tmpl index 9548c44..435d73c 100644 --- a/weblog/index.html.tmpl +++ b/weblog/index.html.tmpl @@ -18,9 +18,9 @@ <p><a href="{{rel .OutputPath "/feed.xml"}}">Atom feed</a></p> </section> - {{$posts := sortPages (index .Pages "weblog") "post_date"}}{{with $posts}}<section> + {{$posts := sortPages (index .Pages "weblog") "post_date" "mod_time"}}{{with $posts}}<section> <ul class="posts"> - {{range .}}<li><time datetime="{{date (index .Meta "post_date") "2006-01-02"}}">{{date (index .Meta "post_date") "2006-01-02"}}</time><a href="{{rel "weblog/index.html" .OutputPath}}">{{.Title}}</a></li>{{end}} + {{range .}}{{$post_date := or (index .Meta "post_date") .ModTime}}<li><time datetime="{{date $post_date "2006-01-02"}}">{{date $post_date "2006-01-02"}}</time><a href="{{rel "weblog/index.html" .OutputPath}}">{{.Title}}</a></li>{{end}} </ul> </section>{{end}} </main> |
