From 7c88fb7314cd78b8c6fbef86e3d887f3117291b1 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 19 Feb 2025 22:52:44 +0100 Subject: [PATCH] =?UTF-8?q?index=20li=C3=A9=20aux=20articles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linking_articles_prev_next.py | 14 +------ templates/html/index_template.html.jinja | 53 +++++++++++++++++++----- 2 files changed, 45 insertions(+), 22 deletions(-) diff --git a/linking_articles_prev_next.py b/linking_articles_prev_next.py index 490bf167..e4efc720 100644 --- a/linking_articles_prev_next.py +++ b/linking_articles_prev_next.py @@ -91,17 +91,6 @@ for basename, info in files_dict.items(): print(f"Nombre d'articles mis à jour après le 01 01 2024 : {count_articles_updated}") - -# Afficher le dictionnaire pour vérification -# for basename, info in files_dict.items(): -# print(f"Article: {basename}") -# print(f" Path: {info['path']}") -# print(f" tags: {info['tags']}") -# print(f" title: {info['title']}") -# print(f" Previous: {info['previous']}") -# print(f" Next: {info['next']}") -# print("-" * 40) - def generate_blog_index(json_file, template_file, output_file): """ Génère la page d'index du blog à partir des informations JSON et d'un template Jinja2. @@ -125,7 +114,8 @@ def generate_blog_index(json_file, template_file, output_file): output_html = template.render( template_content=configs_sites[args.blog], articles=sorted_articles[:global_config['posts_per_page']], - articles_info=articles_info + articles_others=sorted_articles[10:] + ) # Écrire le fichier de sortie diff --git a/templates/html/index_template.html.jinja b/templates/html/index_template.html.jinja index d706fd26..9421a8b2 100644 --- a/templates/html/index_template.html.jinja +++ b/templates/html/index_template.html.jinja @@ -4,11 +4,11 @@ - - - - - + + + + + @@ -30,13 +30,13 @@