1
0
Fork 0
forked from github/pelican

Only use relative paths in StaticGenerator

Previously some paths were relative and some were absolute,
which lead to multiple Content objects for the same static file
in self.staticfiles.
This commit is contained in:
Eklavya Sharma 2019-07-09 23:50:17 +05:30
commit 126f72e1cd

View file

@ -800,8 +800,7 @@ class StaticGenerator(Generator):
def generate_context(self):
self.staticfiles = []
linked_files = {os.path.join(self.path, path)
for path in self.context['static_links']}
linked_files = set(self.context['static_links'])
found_files = self.get_files(self.settings['STATIC_PATHS'],
exclude=self.settings['STATIC_EXCLUDES'],
extensions=False)