Skip to content

global data is not passed to liquidjs as globals #1541

Open
@binyamin

Description

@binyamin

Describe the bug
With {% render layout.html %}, you can only access a variable if it's defined in the included template/partial or passed down to liquid via liquidOptions.globals. 11ty refers to "global data", which is undefined within such partials.

To Reproduce
See example repo
If you don't feel like running the example repo:

  1. In a new 11ty project, reference a global data key from within an include/partial.
  2. In a markdown file, {% render %} the include/partial.
  3. Run npx eleventy

Expected behavior
I expect that data which is the same for every page (eg. pkg, _data/**/*) is passed down to liquid, whereas local variables are not.

Environment:

  • OS and Version: Xubuntu 20.04
  • Eleventy Version: 1.0.0-beta.0+sha:9042341 😉

Additional context
Related: harttle/liquidjs#185

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions