Exclude pages in subdirectories for non-page templates
authorMagnus Hagander <magnus@hagander.net>
Sat, 30 Dec 2017 16:50:09 +0000 (17:50 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 30 Dec 2017 16:50:09 +0000 (17:50 +0100)
tools/deploystatic/deploystatic.py

index eecbf48b856eade04b18b64cb17e22e1ec45051a..32d2d604ee122ea23a61dc1621eae3b0f92a9d68 100755 (executable)
@@ -277,7 +277,7 @@ if __name__ == "__main__":
                # system.
                knownfiles = []
                for relpath, relname in source.walkfiles('templates'):
-                       if relpath == 'templates/pages': continue
+                       if relpath.startswith('templates/pages'): continue
 
                        if not os.path.isdir(os.path.join(args.destpath, relpath)):
                                os.makedirs(os.path.join(args.destpath, relpath))