Skip to content

Documentation says setting layout with eleventyComputed is not possible… but it is? #2873

Open
@nhoizey

Description

@nhoizey

Documentation about Computed Data says that "Computed Data cannot be used to modify the special data properties used to configure templates (e.g. layout, pagination, tags etc.)."

I have however been using eleventyComputed to set layout for quite some time in some of my projects.

An example: https://github.com/nhoizey/nicolas-hoizey.photo/blob/b991d096abd51a3e9d96b562413b1c01aefc2097/src/_data/eleventyComputed.js#L55-L91

The documentation also says "These restrictions may be relaxed over time.", so I guess it's already true, at least for layout.

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