Only include the last 10 posts in feeds

This commit is contained in:
akp 2025-05-06 18:11:03 +01:00
parent 29660f7a09
commit d78944762b

View file

@ -391,7 +391,7 @@ def blog(base_dir: Path, output_dir: Path, jinja_env: jinja2.Environment, site_c
) )
) )
feed_post_list = list(filter(lambda x: (p := posts[x.slug].get("visible", {})) != False and p.get("feed", True), post_list)) feed_post_list = list(filter(lambda x: (p := posts[x.slug].get("visible", {})) != False and p.get("feed", True), post_list))[:10]
# generate feeds # generate feeds
with open(output_dir / "blog" / "feed.atom", "w") as f: with open(output_dir / "blog" / "feed.atom", "w") as f: