From 4dbaab7dd4fc6dd4cf3f2d5558025f69d9f9d7ac Mon Sep 17 00:00:00 2001
From: shortcutme <hello@noloop.me>
Date: Sun, 4 Sep 2016 18:07:09 +0200
Subject: [PATCH] List site content.json files without user files

---
 src/Content/ContentManager.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/Content/ContentManager.py b/src/Content/ContentManager.py
index 794593ca..66404587 100644
--- a/src/Content/ContentManager.py
+++ b/src/Content/ContentManager.py
@@ -257,6 +257,13 @@ class ContentManager(object):
     def listModified(self, since):
         return self.contents.db.listModified(self.site.address, since)
 
+    def listContents(self, inner_path="content.json", user_files=False):
+        back = [inner_path]
+        content_inner_dir = helper.getDirname(inner_path)
+        for relative_path in self.contents[inner_path].get("includes", {}).keys():
+            include_inner_path = content_inner_dir + relative_path
+            back += self.listContents(include_inner_path)
+        return back
 
     # Returns if file with the given modification date is archived or not
     def isArchived(self, inner_path, modified):