Browse Source

Bugfix: PubTime

master
juju2013 9 months ago
parent
commit
d4ce241ac2
2 changed files with 4 additions and 1 deletions
  1. 1
    1
      examples/amber/posts/README.md
  2. 3
    0
      gen.go

+ 1
- 1
examples/amber/posts/README.md View File

@@ -1,5 +1,5 @@
---
Date: 2019-09-15
PubTime: 2019-08-16
Title: Jfever, yet another static site generator
Author: Juju
Category: technologie, blog, generator, golang

+ 3
- 0
gen.go View File

@@ -381,6 +381,9 @@ func (folder *FOLDER) newPage(mdf string) {
p.Meta[k] = v
}
p.DstName = p.Meta["Slug"]
if t, err := time.Parse("2006-01-02", p.Meta["PubTime"]); err == nil {
p.PubTime = t
}

if _, ok := p.Meta["Index"]; ok {
folder.index = &p

Loading…
Cancel
Save