API/data type documentation for content, and other "Eleventy Supplied Data"
#1877
francoposa
started this conversation in
Documentation Queue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It's possible I missed this but I cannot find in the docs site any real API doc or even direct reference to what exactly
contentis - it seems to be just sort of inferred that it's everything after the front matter in an input file (post rendering)? Are there any other wrinkles?The
pagedata type is well documented here: https://www.11ty.dev/docs/data-eleventy-supplied/#page-variable, as is theeleventytype below it: https://www.11ty.dev/docs/environment-vars/#eleventy-supplied.In contrast
contentis only tangentially referred to under "collection item data structure": https://www.11ty.dev/docs/collections/#collection-item-data-structure. But consideringcontentis listed at the top of the "Eleventy Supplied Data" page, it's confusing that it's not mentioned again at all on that page.Even
collectionsdoesn't really have a doc of its full structure the same way thatpagedoes - as you read the guide you are introduced to the built-incollections.allthen the tag-generated ones likecollections.post. Are there other attributes? Do we just infer that that is all there is?It would be super helpful if each of these few built-ins had a doc section as clear as the
pagedata type, and we didn't have to jump around through several pages to sort of back into and assume what the structures are.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions