Open andyford opened 3 years ago
Ah... Yeah, page
has somewhat of a special meaning in 11ty. See https://www.11ty.dev/docs/data-eleventy-supplied/.
Probably easiest to choose a slightly different alias name to avoid conflicts with the built-in page
variable.
Probably easiest to choose a slightly different alias name to avoid conflicts with the built-in page variable.
... right but my suggestion is to either support alias: page
or at least call out this caveat in the docs. Otherwise more poor souls will lose time and hair over this as the error message isn't particularly helpful
created a PR on the eleventy doc site to document this caveat https://github.com/11ty/11ty-website/pull/1073
I also ran into this same issue recently, and couldn't figure out why I was getting the date function error, for like a week. Changing page
to item
fixed it.
Definitely documentation for this would be great, but I'd also love to see a console error explaining the real problem.
given this frontmatter pagination setup:
Eleventy will throw the following error:
This appears to be because of using the name
page
inalias: page
.It would be great to support
alias: page
without issue, but if that's not feasible, it would be nice to add this caveat to the documentation.