Fix show comments display and comment date format

This commit is contained in:
James Skemp 2018-01-05 15:23:21 -06:00
parent 07aac604b0
commit f44933ef9b
5 changed files with 5 additions and 4 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
public

View File

@ -1 +0,0 @@
{"_id":"6de6daf0-f254-11e7-bb32-776658255317","name":"James Skemp","email":"f43dfd72c066838b02985e4c6e7f4270","message":"Test test.","date":1515183009}

View File

@ -29,8 +29,6 @@ comments:
generatedFields:
date:
type: date
options:
format: "timestamp-seconds"
# Whether entries need to be appproved before they are published to the main
# branch. If set to `true`, a pull request will be created for your approval.

View File

@ -32,6 +32,7 @@
{{ partial "disqus-waking.html" . }}
{{ partial "staticman/show-comments.html" . }}
{{ partial "staticman.html" . }}
{{ partial "footer.html" . }}

View File

@ -1,9 +1,11 @@
<div id="comments" class="row">
<div class="large-9 large-centered columns">
<h2>Comments</h2>
{{ $comments := readDir "data/comments" }}
{{ $.Scratch.Add "hasComments" 0 }}
{{ $entryId := .UniqueID }}
{{ if eq $entryId "" }}
{{ if eq .UniqueID "" }}
{{ $entryId := "page" }}
{{ end }}