1
Fork 0

Move generated to their own location

This commit is contained in:
Jake Howard 2023-09-15 21:23:33 +01:00
parent d0fea7851a
commit 2f94dc4231
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ class Resize(NamedTuple):
width: int width: int
def get_resize_url(self): 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): def get_dest_path(self):
return self.get_resize_url().lstrip("/") return self.get_resize_url().lstrip("/")

View file

@ -36,7 +36,7 @@ def fence_div_format(site_dir, source, language, *args, attrs, **kwargs):
filename = hashlib.md5(source.encode()).hexdigest() + ".svg" 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("/"))) write_file(diagram, os.path.join(site_dir, image_url.removeprefix("/")))