From 84679c7b2cf9c3ad3b67b39242fed325f0d70271 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Mon, 26 Aug 2024 11:08:09 +0100 Subject: [PATCH] site/ --- site/pelicanconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/pelicanconf.py b/site/pelicanconf.py index 38247e9..158b9c2 100644 --- a/site/pelicanconf.py +++ b/site/pelicanconf.py @@ -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):