~kungtotte/dtt

3bc0416155df317b82d90564dbd95de5f3b5757a — Thomas Landin 4 months ago bad3b7f
Set up for future blog indexing

I don't know how I want to do this feature yet, but the parts are all
there now.
1 files changed, 6 insertions(+), 1 deletions(-)

M src/dtt.nim
M src/dtt.nim => src/dtt.nim +6 -1
@@ 188,8 188,13 @@ proc buildCmd() =
          savepath = joinPath(outdir, dir)
        if ext == ".md":
          var tmpl = "page.mustache"
          if fname == "index":
            tmpl = "index.mustache"
          if blogs.len > 0:
            mcontext["posts"] = blogs
            # TODO: Implement proper blog display here
            # Right now it just makes everything into a page and does
            # no automatic linking/indexing.
            discard
          let output  = mcontext.renderTemplate(condir / f, tmpl, tmpldir = tmpldir)
          writeFile(savepath / fname & ".html", output)
        else: