Move generated to their own location
This commit is contained in:
parent
d0fea7851a
commit
2f94dc4231
2 changed files with 2 additions and 2 deletions
|
@ -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("/")
|
||||||
|
|
|
@ -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("/")))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue