Skip to content
Snippets Groups Projects
Verified Commit a020cb16 authored by psy's avatar psy
Browse files

include templates in docker, move template directory to /usr/local/share/

parent cee4aa17
No related branches found
No related tags found
1 merge request!2add templates
Pipeline #9693 passed
......@@ -8,3 +8,4 @@ RUN apt-get -qq update && \
apt-get -qq clean
COPY directory-listing/create-index.py /usr/local/bin/create-directory-html-index
COPY directory-listing/templates/ /usr/share/templates/
......@@ -10,7 +10,7 @@ def timestamp_to_datetime(timestamp):
return datetime.fromtimestamp(timestamp)
def main(inputfolder, outputfolder, template, ignore_files):
jinjaenv = jinja2.Environment(autoescape=jinja2.select_autoescape(), loader=jinja2.FileSystemLoader("templates"))
jinjaenv = jinja2.Environment(autoescape=jinja2.select_autoescape(), loader=jinja2.FileSystemLoader("/usr/local/share/templates"))
jinjaenv.filters["timestamp_to_datetime"] = timestamp_to_datetime
template = jinjaenv.get_template(f"{template}.html.j2")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment