Skip to content

Meta head & foot are not rendered an equal amount of times #1212

Open
@ringods

Description

@ringods

I am using Pattern Lab Node v5.9.3 on Mac, with Node v12.16.3, using a Custom Edition with engine-twig

Expected Behavior

Meta head & foot to be rendered the same amount of times.

Actual Behavior

Meta foot is rendered more times.

Steps to Reproduce

In trying to track the cause of #1201, I bumped into a strange behavior of PL. I added a log statement in the renderPattern call of engine-twig. In the example project, only rendering a single pattern, there are two additional summary pages. In this case, I expect the _meta/_00-head.twig and _meta/_01-foot.twig to be rendered 3 times. However, I get this:

$ patternlab build --config ./patternlab-config.json
Pattern Lab Node v5.9.3
Pattern Engine handlebars: good to go
Pattern Engine mustache: good to go
Pattern Engine twig: good to go
renderPattern(_00-head.twig)
renderPattern(_00-head.twig)
renderPattern(00-atoms/01-text/00-headings.twig)
renderPattern(_01-foot.twig)
renderPattern(_01-foot.twig)
Built pattern: atoms-headings
Built pattern: atoms-headings
renderPattern(_00-head.twig)
renderPattern(_01-foot.twig)
renderPattern(_01-foot.twig)
renderPattern(_01-foot.twig)
Built Pattern Lab front end
⊙ patternlab → build: Yay, your Pattern Lab project was successfully built ☺

The head is rendered 3 times, but the footer is rendered 5 times. How does this come?

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