Add export to latex button (i think)

This commit is contained in:
Kylian Schmidt
2025-07-08 17:04:55 +02:00
parent 8173d7618a
commit 2d98ed0e7a
11 changed files with 1131 additions and 3 deletions
+6 -2
View File
@@ -183,7 +183,7 @@ def build_gallery(source_dir: Path, web_dir: Path,
if relative_path == Path("."):
assets_path = "../assets"
else:
# Count the number of directory levels to go back
# Count directory levels to go back to gallery, then to public_html
depth = len(relative_path.parts)
assets_path = "../" * (depth + 1) + "assets"
@@ -345,6 +345,10 @@ def main() -> None:
"total_size_bytes": current_stats["total_size"]
}
# Calculate relative path to assets for single file
# Single files are at depth 1 (gallery_root/source.name/index.html)
assets_path = "../assets"
output_html = source_web_dir / "index.html"
with output_html.open("w") as f:
f.write(template.render(
@@ -355,7 +359,7 @@ def main() -> None:
ui=CONFIG.ui,
stats=stats,
folder_metadata={},
assets_path="../../assets"
assets_path=assets_path
))
print(f"Generated {output_html}")