Skip to content

Commit

Permalink
site/
Browse files Browse the repository at this point in the history
  • Loading branch information
phlax committed Aug 26, 2024
1 parent c953ad2 commit 84679c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions site/pelicanconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ def _add_file_to_structure(self, directory_structure, path):
current["files"][components[-1]] = {"class": self.class_for_file(components[-1])}

def class_for_file(self, filename):
mime_type, encoding = mimetypes.guess_type(filename)
mimetype, encoding = mimetypes.guess_type(filename)
print(f"{filename}: {mimetype} {encoding}")

if encoding in ["gzip", "bz2"]:
return "fa-compress"
return self.mime_to_icon.get(mime_type) or self.mime_to_icon.get("application/octet-stream")
return self.mime_to_icon.get(mimetype) or self.mime_to_icon.get("application/octet-stream")


class Indexer(object):
Expand Down

0 comments on commit 84679c7

Please sign in to comment.