Better dates
Anirudh Oppiliappan x@icyphox.sh
Fri, 22 Jan 2021 20:23:10 +0530
2 files changed,
3 insertions(+),
2 deletions(-)
M
config.yaml
→
config.yaml
@@ -8,7 +8,7 @@ </section>
siteurl: "https://icyphox.sh" rssprefixurl: "https://icyphox.sh/blog/" description: "Computers, security and computer security." -datefmt: "02 January, 2006" +datefmt: "02 Jan, 2006" author: name: "Anirudh Oppiliappan" email: "x@icyphox.sh"
M
templates/index.html
→
templates/index.html
@@ -36,9 +36,10 @@ {{ .Cfg.Header }}
</header>--> {{ .Fm.Body }} <table> + {{ $datefmt := .Cfg.DateFmt }} {{ range $_, $post := .Posts }} <tr> - <td align="left" class="index-date">{{ $post.Fm.Date.Format "02 Jan 2006" }}</td> + <td align="left" class="index-date">{{ $post.Fm.Date.Format $datefmt }}</td> <td align="left" class="index-post"> <a href="/blog/{{ $post.Fm.URL }}">{{ $post.Fm.Title }}</a> </td>