diff --git a/build.py b/build.py index dcd45bd..3dc5339 100644 --- a/build.py +++ b/build.py @@ -26,8 +26,9 @@ def build(): logging.info("🚀 Starting build...") ensure_dir(BUILD_DIR) copy_assets(JS_DIR, STYLE_DIR, BUILD_DIR) + + # Defining build vars build_date = datetime.now().strftime("%Y%m%d%H%M%S") - site_vars = load_yaml(SITE_FILE) gallery_sections = load_yaml(GALLERY_FILE) build_section = site_vars.get("build", {}) @@ -35,7 +36,11 @@ def build(): theme_vars, theme_dir = load_theme_config(theme_name, THEMES_DIR) fonts_dir = theme_dir / "fonts" theme_css_path = theme_dir / "theme.css" + canonical_url = site_vars.get("info", {}).get("canonical", "").rstrip("/") + canonical_home = f"{canonical_url}/" + canonical_legals = f"{canonical_url}/legals/" + # Copying theme.css if existing if theme_css_path.exists(): dest_theme_css = BUILD_DIR / "style" / "theme.css" dest_theme_css.parent.mkdir(parents=True, exist_ok=True) @@ -51,6 +56,7 @@ def build(): generate_favicons_from_logo(theme_vars, theme_dir, BUILD_DIR / "img" / "favicon") generate_favicon_ico(theme_vars, theme_dir, BUILD_DIR / "favicon.ico") + # Converting and resizing images if enabled convert_images = build_section.get("convert_images", False) resize_images = build_section.get("resize_images", False) logging.info(f"[~] convert_images = {convert_images}") @@ -66,6 +72,7 @@ def build(): copy_original_images(hero_images, IMG_DIR, BUILD_DIR) copy_original_images(gallery_images, IMG_DIR, BUILD_DIR) + # Adding menu menu_html = "\n".join( f'
{item['paragraph']}
" for item in ip_paragraphs) legals_context = { @@ -143,11 +160,13 @@ def build(): else: logging.warning("[~] No legals section found in site.yaml") + # Hero carrousel generator if hero_images: generate_gallery_json_from_images(hero_images, BUILD_DIR / "data" / "gallery.json") else: logging.warning("[~] No hero images found, skipping JSON generation.") + # Sitemap and robot.txt generator site_info = site_vars.get("info", {}) canonical_url = site_info.get("canonical", "").rstrip("/") if canonical_url: diff --git a/config/themes/typewriter/fonts/trixie.eot b/config/themes/typewriter/fonts/trixie.eot deleted file mode 100644 index d74d5a2..0000000 Binary files a/config/themes/typewriter/fonts/trixie.eot and /dev/null differ diff --git a/config/themes/typewriter/fonts/trixie.svg b/config/themes/typewriter/fonts/trixie.svg deleted file mode 100644 index f2c00b9..0000000 --- a/config/themes/typewriter/fonts/trixie.svg +++ /dev/null @@ -1,610 +0,0 @@ - - - diff --git a/config/themes/typewriter/fonts/trixie.ttf b/config/themes/typewriter/fonts/trixie.ttf deleted file mode 100644 index 4dab21a..0000000 Binary files a/config/themes/typewriter/fonts/trixie.ttf and /dev/null differ diff --git a/src/templates/head.html b/src/templates/head.html index 80001ee..029372b 100644 --- a/src/templates/head.html +++ b/src/templates/head.html @@ -1,5 +1,6 @@ +