Use content.json-default if exists

This commit is contained in:
shortcutme 2016-12-14 00:42:31 +01:00
parent c0d2e5efa6
commit 62501d00b1

View file

@ -535,7 +535,10 @@ class Site(object):
# Copy root content.json # Copy root content.json
if not new_site.storage.isFile("content.json") and not overwrite: if not new_site.storage.isFile("content.json") and not overwrite:
# Content.json not exist yet, create a new one from source site # Content.json not exist yet, create a new one from source site
content_json = self.storage.loadJson("content.json") if self.storage.isFile(root_inner_path + "/content.json-default"):
content_json = self.storage.loadJson(root_inner_path + "/content.json-default")
else:
content_json = self.storage.loadJson("content.json")
if "domain" in content_json: if "domain" in content_json:
del content_json["domain"] del content_json["domain"]
content_json["title"] = "my" + content_json["title"] content_json["title"] = "my" + content_json["title"]