Skip to content

Partial uses collection, which include partials - js/css includes in nested partials aren't loading #3730

Open
@jasonday

Description

@jasonday

Operating system

Windows

Eleventy

3.0.0

Describe the bug

I have a page that uses a partial and this partial loops through a collection "docs".

{% set itemList = collections.docs %}
{% include 'partials/details.njk' %}

I also have a gallery partial, which takes frontmatter and builds a gallery:

gallery:
  - image: /assets/images/projects/FAR/FAR1-workbook.PNG
    alt: 'Fidelity Investments FAR workbook, 1st page'
    caption: 'Fidelity Accessibility Requirements scoring workbook'
  - image: /assets/images/projects/FAR/FAR1-scores-for-steps.PNG
    alt: 'Close-up of a delicate white flower with a yellow center, surrounded by green leaves'
    caption: 'Jasmine nightshades blooming in July'
  - image: /assets/images/projects/FAR/FAR1-worksheet.PNG
    alt: "A traditional Asturian village with it's raised granaries, surrounded by lush green hills and mountains"
    caption: 'Traditional houses in Santullano, Somiedo Natural Park, Asturias'
  - image: /assets/images/projects/FAR/FAR1-worksheet-filled.PNG
    alt: 'Close-up with unfocused background of a vibrant large blue butterfly gracefully perched on a delicate flower amidst lush green grass'
    caption: 'A large blue (Phengaris arion)'
---

and the include

{% include "partials/gallery.njk" %}

If I use the gallery include within a page in the docs collection, the gallery include's css/script includes are not loaded.

How do I ensure that nested nature of the partials/includes, works as expected?

Reproduction steps

Expected behavior

No response

Reproduction URL

No response

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions