|
|
@@ -6,7 +6,7 @@ import re |
|
|
|
|
|
|
|
from jinja2 import Environment, PackageLoader, select_autoescape |
|
|
|
|
|
|
|
from configuration import THEME |
|
|
|
from configuration import SITE_TITLE, THEME |
|
|
|
|
|
|
|
|
|
|
|
PICTURES_DIR_NAME = "photos" |
|
|
@@ -65,7 +65,9 @@ def generate_index(output_path, galleries): |
|
|
|
index_template = jinja_env.get_template("index.html.j2") |
|
|
|
|
|
|
|
with open(index_path, "w") as index_file: |
|
|
|
index_file.write(index_template.render(galleries=galleries)) |
|
|
|
index_file.write( |
|
|
|
index_template.render(galleries=galleries, site_title=SITE_TITLE) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
def generate_gallery(output_path, gallery): |
|
|
@@ -83,7 +85,9 @@ def generate_gallery_index(output_path, gallery): |
|
|
|
gallery_template = jinja_env.get_template("gallery.html.j2") |
|
|
|
|
|
|
|
with open(gallery_index_path, "w") as gallery_file: |
|
|
|
gallery_file.write(gallery_template.render(gallery=gallery)) |
|
|
|
gallery_file.write( |
|
|
|
gallery_template.render(gallery=gallery, site_title=SITE_TITLE) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
def generate_gallery_dir(output_path, gallery): |