Fix sidebar for empty sites
This commit is contained in:
parent
173a7fc409
commit
5e6b41945b
1 changed files with 2 additions and 0 deletions
|
@ -279,6 +279,8 @@ class ContentManager(object):
|
||||||
return self.contents.db.listModified(self.site, since)
|
return self.contents.db.listModified(self.site, since)
|
||||||
|
|
||||||
def listContents(self, inner_path="content.json", user_files=False):
|
def listContents(self, inner_path="content.json", user_files=False):
|
||||||
|
if inner_path not in self.contents:
|
||||||
|
return []
|
||||||
back = [inner_path]
|
back = [inner_path]
|
||||||
content_inner_dir = helper.getDirname(inner_path)
|
content_inner_dir = helper.getDirname(inner_path)
|
||||||
for relative_path in self.contents[inner_path].get("includes", {}).keys():
|
for relative_path in self.contents[inner_path].get("includes", {}).keys():
|
||||||
|
|
Loading…
Reference in a new issue