diff --git a/gather_tags_in_json.py b/gather_tags_in_json.py index ea7ceddb..43d4f6a3 100644 --- a/gather_tags_in_json.py +++ b/gather_tags_in_json.py @@ -108,7 +108,7 @@ def generate_html_pages_for_all_tags(tag_to_files, html_output_folder): # Charger le template Jinja2 env = Environment(loader=FileSystemLoader('.')) - template = env.get_template('templates/html/tag.html.jinja') + template = env.get_template('templates/html/tag.html.j2') sorted_tags = sorted(tag_to_files.items()) for tag, files in tag_to_files.items(): @@ -141,7 +141,7 @@ def generate_index_page(tag_to_files, html_output_folder): # Charger le template Jinja2 env = Environment(loader=FileSystemLoader('.')) - template = env.get_template('templates/html/tag.html.jinja') + template = env.get_template('templates/html/tag.html.j2') sorted_tags = sorted(tag_to_files.items()) tags_count = {tag: len(files) for tag, files in sorted_tags} diff --git a/linking_articles_prev_next.py b/linking_articles_prev_next.py index a5d77ec3..5542e4c0 100644 --- a/linking_articles_prev_next.py +++ b/linking_articles_prev_next.py @@ -466,7 +466,7 @@ Dernière mise à jour: {dt.datetime.now().strftime('%Y-%m-%d, %H:%M:%S')} # Générer la page d'index seulement si des articles ont été convertis if pandoc_runs_counter > 0 or run_gemini or force_html_regen: # Appel de la fonction pour générer la page d'index - generate_blog_index(destination_json + '/articles_info.json', 'templates/html/index.html.jinja', destination_html + 'index.html') + generate_blog_index(destination_json + '/articles_info.json', 'templates/html/index.html.j2', destination_html + 'index.html') print(f"\033[94m index régénéré {destination_html}index.html \033[0m") # else: @@ -547,7 +547,7 @@ def generate_article_pages(json_file, template_file, output_dir): # if pandoc_runs_counter or run_gemini: # Appel de la fonction pour générer les pages des articles -generate_article_pages(destination_json + '/articles_info.json', 'templates/html/article.html.jinja', destination_html) +generate_article_pages(destination_json + '/articles_info.json', 'templates/html/article.html.j2', destination_html) # À la fin du script, calculer et afficher le temps d'exécution execution_time = time.time() - start_time diff --git a/templates/html/article.html.jinja b/templates/html/article.html.j2 similarity index 69% rename from templates/html/article.html.jinja rename to templates/html/article.html.j2 index 79bcddc2..6e27ecf0 100644 --- a/templates/html/article.html.jinja +++ b/templates/html/article.html.j2 @@ -1,40 +1,10 @@ - - - - - - - - - - - - - - - - {{ article.title | safe }} -{{template_content['TITLE']}} - - - - - - - - - - - - - - +{% include 'site_head.j2' %} +