~kungtotte/dtt

bc6869b821d1ac706f40d1a007ff3f9f06230e5f — Thomas Landin 4 months ago 3bc0416
Add some TODO:s
1 files changed, 9 insertions(+), 1 deletions(-)

M src/dtt.nim
M src/dtt.nim => src/dtt.nim +9 -1
@@ 89,8 89,11 @@ proc cleanCmd(all: bool = false, force: bool = false) =
    stderr.writeLine(fmt"{bin}: {wd} does not exist.")
    quit(ord(DttError.DirectoryNotFound))


proc loadMetaData(path: string, mcontext: var Context) =
  # TODO: Make dtt move backwards up the hierarchy to look for config.cfg
  # so we don't error out if someone happens to run `dtt build` inside the
  # content  directory instead of the root dtt directory.

  # Load meta-data from config file into the supplied
  # mustache context
  let cfgdict = loadConfig(path)


@@ 187,6 190,11 @@ proc buildCmd() =
          (dir, fname, ext) = splitFile(f)
          savepath = joinPath(outdir, dir)
        if ext == ".md":
          # TODO: Build in some logic for selecting predetermined templates
          # based on filename. e.g. index -> index.mustache
          # Either hardcode some options or let it look for <name>.mustache
          #
          # It's probably better to just make it look for <name>.mustache.
          var tmpl = "page.mustache"
          if fname == "index":
            tmpl = "index.mustache"