From 62939f6b41d66fcd87a91821271e61760f577614 Mon Sep 17 00:00:00 2001 From: oiseauroch Date: Sat, 8 Apr 2023 15:39:28 +0200 Subject: [PATCH] add blog-page --- content/blog/_index.md | 4 ++-- templates/blog-list.html | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 templates/blog-list.html diff --git a/content/blog/_index.md b/content/blog/_index.md index a9c2a08..920e824 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,9 +1,9 @@ +++ title = "List of blog posts" sort_by = "date" -template = "index.html" +template = "blog-list.html" page_template = "blog-page.html" -paginate_by = 4 +paginate_by = 9 +++ diff --git a/templates/blog-list.html b/templates/blog-list.html new file mode 100644 index 0000000..c8dc0ef --- /dev/null +++ b/templates/blog-list.html @@ -0,0 +1,34 @@ +{% extends "base.html" %} +{% import 'macros/card.html' as macro_card -%} + +{% block content %} +
+ {% for page in paginator.pages %} + {{ macro_card::create_card(link=page.permalink, img=page.extra.image, title=page.title, subtitle="la génèse", abstract=page.summary, tags=page.taxonomies.tags, date=page.date) }} + {% endfor %} +
+ + +{% endblock content %}