eleventy icon indicating copy to clipboard operation
eleventy copied to clipboard

`---node` frontmatter not documented

Open mayank99 opened this issue 1 year ago • 1 comments

I was trying to use the Node frontmatter in the 3.0 alpha, and couldn't find any docs on it.

The closest thing I found was this section on custom JavaScript frontmatter: https://www.11ty.dev/docs/data-frontmatter-customize/#example-use-javascript-in-your-front-matter

On that note, I wonder why the built-in functionality uses ---node and not ---javascript. The latter seems more accurate, especially since 11ty can now run in alternative runtimes like Deno.

mayank99 avatar May 15 '24 01:05 mayank99

11ty can now run in alternative runtimes like Deno.

Actually I couldn't find any docs on this either. Is there an example somewhere?

I'm happy to contribute docs if I can understand how to use it.

mayank99 avatar May 16 '24 04:05 mayank99

Some discussion about this here: https://github.com/11ty/eleventy/issues/2819

zachleat avatar May 24 '24 20:05 zachleat

Deno information here: https://github.com/11ty/eleventy/issues/3278 and slide 59–60 of this talk: https://www.zachleat.com/web/11tyconf-keynote-2024/

zachleat avatar May 24 '24 20:05 zachleat

Some discussion about this here: #2819

Looking at that thread, this comment stands out to me:

some day, conceivably, there could be other JavaScript runtime that could be used to run Eleventy, and if you’re using something like Bun to run Eleventy, then calling this frontmatter type node seems a little weird. 🤔


Deno information here: #3278 and slide 59–60 of this talk: https://www.zachleat.com/web/11tyconf-keynote-2024/

I saw this but still couldn't figure out how to run in Deno (I was probably doing something wrong). A minimal example would be helpful.

mayank99 avatar May 30 '24 00:05 mayank99

I’m going through the issues closed on the 3.0 milestone and adding needs-documentation tags. Let’s use #2819 as the home base for the docs issue for this too.

Can you file a separate issue for your Deno issue? Maybe also have a look at #3278 which shows the command line command that I used to run against 11ty/eleventy-base-blog.

zachleat avatar May 30 '24 22:05 zachleat