From 2f94dc42314f79a43769c26e5942dbb3f69b377c Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 15 Sep 2023 21:23:33 +0100 Subject: [PATCH] Move generated to their own location --- hooks/images.py | 2 +- hooks/kroki.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/images.py b/hooks/images.py index c71365a..da51b33 100644 --- a/hooks/images.py +++ b/hooks/images.py @@ -11,7 +11,7 @@ class Resize(NamedTuple): width: int def get_resize_url(self): - return f"/_resized/w/{self.width}/{self.url}" + return f"/_gen/resized/w/{self.width}/{self.url}" def get_dest_path(self): return self.get_resize_url().lstrip("/") diff --git a/hooks/kroki.py b/hooks/kroki.py index be93514..a0bc95b 100644 --- a/hooks/kroki.py +++ b/hooks/kroki.py @@ -36,7 +36,7 @@ def fence_div_format(site_dir, source, language, *args, attrs, **kwargs): filename = hashlib.md5(source.encode()).hexdigest() + ".svg" - image_url = f"/assets/kroki-generated/{language}/{filename}" + image_url = f"/_gen/kroki/{language}/{filename}" write_file(diagram, os.path.join(site_dir, image_url.removeprefix("/")))