Only include the last 10 posts in feeds
This commit is contained in:
parent
29660f7a09
commit
d78944762b
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue