diff --git a/.gitignore b/.gitignore
index ea00f27..8fb0456 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
-.venv
-.output
-__pycache__
\ No newline at end of file
+.*
+!.gitignore
+output/
+__pycache__/
\ No newline at end of file
diff --git a/README.MD b/README.MD
index 7db8eb5..437939b 100644
--- a/README.MD
+++ b/README.MD
@@ -3,13 +3,13 @@
-**Lumeex** - Yet another minimalist photo gallery with a static site generator.
+**Lumeex** - Yet another minimalist very light photo gallery with a static site generator.
Lumeex is a static site generator that builds a minimalist photo gallery. The project was born from the need to create a gallery focused more on the artworks than the author, while allowing users to organize works using tags and share filtered views. In this spirit, each page load displays the photos in random order, allowing users to discover new content they might not have seen before.
The project comes with two themes: one modern, the other more minimalistic, both designed to keep the focus on the artworks:
- - Modern π [demo](https://modern.djeex.fr)
- - Typewriter π [demo](https://typewriter.djeex.fr)
+ - Modern π [check the demo](https://modern.djeex.fr)
+ - Typewriter π [check the demo](https://typewriter.djeex.fr)
> [!NOTE]
> _This GitHub repository is a mirror of https://git.djeex.fr/Djeex/lumeex. Youβll find the complete package, history, and release notes there. An LLM is used for bug checking._
@@ -19,7 +19,6 @@ The project comes with two themes: one modern, the other more minimalistic, both
- [Features](#features)
- [Python Installation](#python-installation)
- [Configuration](#configuration)
-- [Build the Site](#build-the-site)
## Features
@@ -71,164 +70,4 @@ You're ready to go!
## Configuration
-All user configuration files are located in the `config` folder.
-
-```sh
-Lumeex/
-βββ config/
- βββ photos/
- β βββ gallery
- β βββ hero
- βββ themes/
- β βββ modern
- β βββ typewriter
- βββ gallery.yaml
- βββ site.yaml
-```
-
-**`photos/`**
-
-- `gallery/`: place your gallery photos here.
-- `hero/`: place carousel photos for the homepage here.
-
-> [!TIP]
-> You can use `gallery.py` to automatically reference all photos in `gallery/` and `hero/` into `gallery.yaml` and `site.yaml` by running `python3 gallery.py` from the `lumeex` directory.
-> Youβll just need to tag the photos in `gallery.yaml`.
-
-**`site.yaml`**
-
-This file contains all your siteβs metadata and settings. For example:
-
-```yaml
-info:
- title: your title
- subtitle: your subtitle
- description: your description
- canonical: all, your, keywords
- author: you
- google_analytics_id: G-XXXXXXX # optional
-
-social:
- instagram_url: https://www.instagram.com/yourprofile
- thumbnail: gallery/anyphoto.png # put the path from your photo folder to your file
-menu:
- items:
- - label: your_home
- href: /
- - label: your_second_menu
- href: /?tag=yourtag1
- - label: Your_third_menu
- href: /?tag=yourtag2
-
-hero:
- images:
- - src: hero/your_photo_1.jpg
- - src: hero/your_photo_2.jpg
- - src: hero/your_photo_3.jpg
-
-footer:
- copyright: Copyright Β© 2025 β You
- legal_link: '/legals.html'
- legal_label: Legal notice
-
-build:
- theme: modern
- convert_images: false
- resize_images: false
-
-legals:
- hoster_name: Your_hoster
- hoster_adress: Your hoster address
- hoster_contact: Your hoster contact
- intellectual_property:
- - paragraph: "Your text here"
- - paragraph: "Your second paragraph here"
- - paragraph: "Etc..."
-```
-
-**`gallery.yaml`**
-
-Use this file to reference the images in `photos/gallery/`. You can do this manually or automatically by running `python3 gallery.py`. You can also assign tags to the photos here.
-
-```yaml
-images:
-- src: gallery/your_photo_1.jpg
- tags: ["portrait"]
-- src: gallery/your_photo_2.jpg
- tags: ["portrait", "sunset", "boat"]
-- src: gallery/your_photo_3.jpg
- tags: ["landscape", "sea", "beach", "sand"]
-```
-
-**`themes/`**
-
-```sh
-themes/
-βββ yourtheme/
- βββ fonts (optional)
- βββ theme.yaml
- βββ theme.css (optional)
- βββ favicon.png
-```
-
-**Lumeex** is shipped with two prebuilt themes:
- - Modern π [demo](https://modern.djeex.fr)
- - Typewriter π [demo](https://typewriter.djeex.fr)
-
-You can edit existing themes or create your own. Each theme can include:
-- **Required:** a `theme.yaml` file for visual settings (colors, fonts, etc.)
-- *(Optional)* a `theme.css` file for additional styling
-- *(Optional)* a `fonts` folder for local fonts
-- *(Optional)* a square `favicon.png` (min 196px) that will be automatically converted to all required formats.
-
-Example `theme.yaml`:
-
-```yaml
-colors:
- primary: '#0065a1'
- primary_dark: '#005384'
- secondary: '#00b0f0'
- accent: '#ffc700'
- text_dark: '#333'
- background: '#fff'
- browser_color: '#fff'
-favicon:
- path: favicon.png
-google_fonts:
- - family: Lato
- weights:
- - '200'
- - '400'
- - '700'
- - family: Montserrat
- weights:
- - '200'
- - '400'
- - '700'
-fonts:
- primary:
- name: Lato
- fallback: sans-serif
- secondary:
- name: Montserrat
- fallback: serif
-```
-
-## Build the Site
-
-Once everything is configured, make sure you're in the `lumeex` directory and your Python virtual environment is activated (`source .venv/bin/activate`).
-
-- *(Optional)* Run `python3 gallery.py` to auto-fill `gallery.yaml` and add carousel photos to `site.yaml`. Don't forget to add tags to your photos in `gallery.yaml`.
-- Run `python3 build.py` to generate the static site.
-- *(Optional)* Serve locally with:
-
-```sh
-python3 -m http.server 3000 --directory .output
-```
-
-Then visit `http://localhost:3000` or, if remote, `http://your-server-ip:3000`.
-
-> [!WARNING]
-> Use this only to test your site. Don't use python server for production !
-
-- Finally, copy the contents of the `.output/` directory to your favorite web server.
+For detailed documentation about configuration options, customization and demo, visit https://lumeex.djeex.fr
\ No newline at end of file
diff --git a/build.py b/build.py
index 1b06c21..9950425 100644
--- a/build.py
+++ b/build.py
@@ -13,7 +13,7 @@ logging.basicConfig(level=logging.INFO, format='%(message)s')
# Define key directories used throughout the script
SRC_DIR = Path.cwd()
-BUILD_DIR = SRC_DIR / ".output"
+BUILD_DIR = SRC_DIR / "output"
TEMPLATE_DIR = SRC_DIR / "src/templates"
IMG_DIR = SRC_DIR / "config/photos"
JS_DIR = SRC_DIR / "src/public/js"
@@ -166,7 +166,7 @@ def build():
# Hero carrousel generator
if hero_images:
- generate_gallery_json_from_images(hero_images, BUILD_DIR / "data" / "gallery.json")
+ generate_gallery_json_from_images(hero_images, BUILD_DIR)
else:
logging.warning("[~] No hero images found, skipping JSON generation.")
@@ -175,8 +175,8 @@ def build():
canonical_url = site_info.get("canonical", "").rstrip("/")
if canonical_url:
allowed_pages = ["/", "/legals/"]
- generate_robots_txt(canonical_url, allowed_pages)
- generate_sitemap_xml(canonical_url, allowed_pages)
+ generate_robots_txt(canonical_url, allowed_pages, BUILD_DIR)
+ generate_sitemap_xml(canonical_url, allowed_pages, BUILD_DIR)
else:
logging.warning("[~] No canonical URL found in site.yaml info section, skipping robots.txt and sitemap.xml generation.")
diff --git a/src/py/html_generator.py b/src/py/html_generator.py
index df13ba4..4eca005 100644
--- a/src/py/html_generator.py
+++ b/src/py/html_generator.py
@@ -23,9 +23,10 @@ def render_gallery_images(images):
"""
return html
-def generate_gallery_json_from_images(images, output_path):
+def generate_gallery_json_from_images(images, output_dir):
try:
img_list = [img["src"] for img in images]
+ output_path = output_dir / "data" / "gallery.json"
output_path.parent.mkdir(parents=True, exist_ok=True)
with open(output_path, "w", encoding="utf-8") as f:
json.dump(img_list, f, indent=2)
@@ -33,7 +34,7 @@ def generate_gallery_json_from_images(images, output_path):
except Exception as e:
logging.error(f"[β] Error generating gallery JSON: {e}")
-def generate_robots_txt(canonical_url, allowed_paths):
+def generate_robots_txt(canonical_url, allowed_paths, output_dir):
robots_lines = ["User-agent: *"]
for path in allowed_paths:
robots_lines.append(f"Allow: {path}")
@@ -41,12 +42,12 @@ def generate_robots_txt(canonical_url, allowed_paths):
robots_lines.append("")
robots_lines.append(f"Sitemap: {canonical_url}/sitemap.xml")
content = "\n".join(robots_lines)
- output_path = Path(".output/robots.txt")
+ output_path = output_dir / "robots.txt"
with open(output_path, "w", encoding="utf-8") as f:
f.write(content)
logging.info(f"[β] robots.txt generated at {output_path}")
-def generate_sitemap_xml(canonical_url, allowed_paths):
+def generate_sitemap_xml(canonical_url, allowed_paths, output_dir):
urlset_start = '\n\n'
urlset_end = '\n'
urls = ""
@@ -54,7 +55,7 @@ def generate_sitemap_xml(canonical_url, allowed_paths):
loc = canonical_url.rstrip("/") + path
urls += f" \n {loc}\n \n"
sitemap_content = urlset_start + urls + urlset_end
- output_path = Path(".output/sitemap.xml")
+ output_path = output_dir / "sitemap.xml"
with open(output_path, "w", encoding="utf-8") as f:
f.write(sitemap_content)
logging.info(f"[β] sitemap.xml generated at {output_path}")