From 82ff6ae2a289c7fc00c2007961d70994af51d1fb Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 17 Feb 2016 01:09:08 +0100 Subject: Show modtime --- index.go | 2 +- tmpl/index | 3 ++- wiki.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.go b/index.go index a9613fd..14f0ca9 100644 --- a/index.go +++ b/index.go @@ -20,7 +20,7 @@ func indexHandler(w http.ResponseWriter, r *http.Request) { for _, entry := range files { file := entry.Name() if !entry.IsDir() && file[0] != '.' { - p.Pages = append(p.Pages, file) + p.Pages = append(p.Pages, entry) } } p.render(w, template.Must(template.ParseFiles("tmpl/root", "tmpl/index"))) diff --git a/tmpl/index b/tmpl/index index d95deca..bd9472a 100644 --- a/tmpl/index +++ b/tmpl/index @@ -2,7 +2,8 @@ {{define "content"}} {{end}} diff --git a/wiki.go b/wiki.go index 6d22bba..cdb49c2 100644 --- a/wiki.go +++ b/wiki.go @@ -10,7 +10,7 @@ import ( type Page struct { Title string Body []byte - Pages []string + Pages []os.FileInfo } func (p *Page) fileName() string { -- cgit v1.2.3