Merge pull request #510 from dsschult/write-static-once
Only copy the static/theme files once
This commit is contained in:
@@ -891,6 +891,7 @@ class Gallery:
|
||||
|
||||
if self.settings["write_html"]:
|
||||
album_writer = AlbumPageWriter(self.settings, index_title=self.title)
|
||||
album_writer.copy_theme_files()
|
||||
album_list_writer = AlbumListPageWriter(
|
||||
self.settings, index_title=self.title
|
||||
)
|
||||
|
||||
@@ -95,8 +95,12 @@ class AbstractWriter:
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
# Copy the theme files in the output dir
|
||||
self.theme_path = os.path.join(self.output_dir, "static")
|
||||
|
||||
def copy_theme_files(self):
|
||||
"""Copy the theme files to the destination"""
|
||||
self.logger.info("Copying the theme files to the output dir")
|
||||
|
||||
if os.path.isdir(self.theme_path):
|
||||
shutil.rmtree(self.theme_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user