I'm new with 11ty and I can't find more info about this part:
"As I understand it, by having a file with a .11ty.js suffix, you're able to introduce some functionality into an endpoint, the path of which you can define in the permalink field of the data() method in the class you return. You can then define the output of that endpoint by returning a string from the render() methods of that class."
Could you tell me where I could find more info about that?
Thank you in advance!
Basically: It's 11ty's way of finding a way to treat a JavaScript file the way it would a template like *.njk, *.md or whatever. Since they're JS, they just need to follow a certain structure so that they export some kind of content. In this case, CSS. 😄
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi @adamkdean! Thank you very much for this post.
I'm new with 11ty and I can't find more info about this part:
"As I understand it, by having a file with a .11ty.js suffix, you're able to introduce some functionality into an endpoint, the path of which you can define in the permalink field of the data() method in the class you return. You can then define the output of that endpoint by returning a string from the render() methods of that class."
Could you tell me where I could find more info about that?
Thank you in advance!
I was confused about this too, check out: 11ty.dev/docs/languages/javascript/
Basically: It's 11ty's way of finding a way to treat a JavaScript file the way it would a template like
*.njk
,*.md
or whatever. Since they're JS, they just need to follow a certain structure so that they export some kind of content. In this case, CSS. 😄