mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-06-20 09:04:42 +02:00
index lié aux articles
This commit is contained in:
parent
b31dcd6f8a
commit
7c88fb7314
2 changed files with 45 additions and 22 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue