eleventy-plugin-bundle icon indicating copy to clipboard operation
eleventy-plugin-bundle copied to clipboard

Bundler is not pagination aware

Open slightlyoff opened this issue 7 months ago • 0 comments

bundle-pagination-bug.patch

Attached is a small patch to demonstrate the issue vs. the 11ty base blog (v9).

Briefly, I would expect the "blarg" bundle's output to appear on the home page which invokes the _includes/postlist.njk iteration over the items. To ensure that accessing non-content properties isn't assumed, I also modify the template to call into templateContent (in a comment) for each post.

What happens: on each leaf page, the content of the "blarg" bundle is correctly output via the short code invocation in _includes/layouts/base.njk, but on the home page, the comment block that should be populated by the change in content/blog/firstpost.md is empty.

What should happen: on both leaf and pagination pages, the content should be hoisted.

Workaround: None yet, but I am going to try to monkeypatch the templateContent getter within the context of pagination to see if I can correctly map the paginated items to the parent URL for the bundler's internal accounting.

slightlyoff avatar Aug 03 '25 18:08 slightlyoff