Skip to content

postlist excerpts ignores post excerpt length of 0 #317

@JulianGro

Description

@JulianGro

Describe the bug

Apparently postlist ignores the length of the except being set to 0 in post.

In my case, this was quite the headscratcher, because the first paragraph was very long, so setting excerpt to 1 didn't make it smaller and setting it to 0 didn't make it smaller either.

I guess this is undefined behaviour? Since We tell postlist to show excerpts, but at the same time the post itself specifies that there should be no excerpt.
I would argue though, that someone disabling excerpts for a single post should take precedence over enabling them for everything.

To Reproduce

Set the excerpt length to 0 in a post:

.. post:: 2025-11-22
   :excerpt: 0

Get the post using postlist:

.. postlist:: 5
   :list-style: circle
   :format: {date} {title}
   :date: %Y-%m-%d
   :excerpts:

Screenshots

No response

System Details

ABlog version 0.11.12

Installation method

pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions