Remove missing optional files from content.json on cloning

This commit is contained in:
shortcutme 2018-11-07 22:48:35 +01:00
parent eae6a34bfc
commit cf7d194dbf
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 6 additions and 2 deletions

View file

@ -681,13 +681,13 @@ class Site(object):
delete_removed_files=False, load_includes=False
)
if privatekey:
new_site.content_manager.sign(file_inner_path.replace("-default", ""), privatekey)
new_site.content_manager.sign(file_inner_path.replace("-default", ""), privatekey, remove_missing_optional=True)
new_site.content_manager.loadContent(
file_inner_path, add_bad_files=False, delete_removed_files=False, load_includes=False
)
if privatekey:
new_site.content_manager.sign("content.json", privatekey)
new_site.content_manager.sign("content.json", privatekey, remove_missing_optional=True)
new_site.content_manager.loadContent(
"content.json", add_bad_files=False, delete_removed_files=False, load_includes=False
)