Added missing metadata to contents.
h3rald h3rald@h3rald.com
Sun, 20 Nov 2016 19:19:19 +0100
1 files changed,
6 insertions(+),
1 deletions(-)
jump to
M
hastysite.nim
→
hastysite.nim
@@ -171,7 +171,12 @@ if yaml == "":
raise NoMetadataException(msg: "No metadata found in file: " & file) if not obj.hasKey("contents"): obj["contents"] = newJObject() - obj["contents"][fileid] = yaml.loadToJson()[0] + var meta = yaml.loadToJson()[0] + meta["path"] = %fileid + meta["type"] = %"content" + meta["id"] = %fileid.changeFileExt("") + meta["ext"] = %fileid.splitFile.ext + obj["contents"][fileid] = meta f.close() proc checkContent(dir, file: string, obj: var JsonNode): bool =