~gpanders/wk

f8a7ff47825b52b36b78eaf3a5d93f736c187f8f — Gregory Anders 4 months ago e52a0ef master
Make tags an array in template
1 files changed, 2 insertions(+), 2 deletions(-)

M src/core.nim
M src/core.nim => src/core.nim +2 -2
@@ 35,7 35,7 @@ proc fromFile(fname: string): Option[Page] =
    if line.match(re"^title: +(.+)$", matches):
      title = unicode.strip(matches[0])

    if line.match(re"^tags: (.+)$", matches):
    if line.match(re"^tags: +\[(.+)]$", matches):
      tags = split(matches[0], ",").mapIt(unicode.strip(it).toLower)

  if title == "":


@@ 71,7 71,7 @@ proc newPage*(title: string): Page =
    "---",
    fmt"title: {title}",
    fmt"date:  {date}",
    fmt"tags:  ",
    fmt"tags:  []",
    "---",
    ""
  ].join("\n")