Raymond Camden is a Senior Developer Evangelist for Adobe. He works on the Document Services APIs to build powerful (and typically cat-related) PDF demos.
1) "eleventyConfig.addPlugin(EleventyServerlessBundlerPlugin, {
name: "color", // The serverless function name from your permalink object
functionsDir: "./netlify/functions/",
});"
If I want 2 (or N) serverless functions for 11ty, how is that done? Just N "addPlugin" calls?
2) "While this file gets generated on the first run, it can be safely edited, as 11ty won't override it in the future."
In what case would you edit the function output? You added it to .gitignore above this statement which implies it's made by 11ty, but if you can "safely" edit it... why would you? And why ignore it?
3) When you set the path to "/color/:type/:color/", if you did NOT setup _redirects, is this still going to work correctly when deployed? You made it sound as if the redirect is only there for PE (which is good of course!), but if I'm being lazy and decide to not worry about it, is a request to /color/x/y still going to work?
4) More of a comment. It kinda feels like this is just (and I say 'just' not meaning to imply anything, I'm only trying to wrap my head around it ;) an "alias" system where I can say, I want /dynamicpath/argX/argY to map to a template file and get easy access to argX and Y. Is that a fair way to tldr it?
5) I don't suppose this would help with a case where I'd want 11ty to build /2021/* and /2003, /2004, etc are built on demand? Unless I made a serverless function called 2003 (and so forth ;)
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.
Lots of questions. :)
1) "eleventyConfig.addPlugin(EleventyServerlessBundlerPlugin, {
name: "color", // The serverless function name from your permalink object
functionsDir: "./netlify/functions/",
});"
If I want 2 (or N) serverless functions for 11ty, how is that done? Just N "addPlugin" calls?
2) "While this file gets generated on the first run, it can be safely edited, as 11ty won't override it in the future."
In what case would you edit the function output? You added it to .gitignore above this statement which implies it's made by 11ty, but if you can "safely" edit it... why would you? And why ignore it?
3) When you set the path to "/color/:type/:color/", if you did NOT setup _redirects, is this still going to work correctly when deployed? You made it sound as if the redirect is only there for PE (which is good of course!), but if I'm being lazy and decide to not worry about it, is a request to /color/x/y still going to work?
4) More of a comment. It kinda feels like this is just (and I say 'just' not meaning to imply anything, I'm only trying to wrap my head around it ;) an "alias" system where I can say, I want /dynamicpath/argX/argY to map to a template file and get easy access to argX and Y. Is that a fair way to tldr it?
5) I don't suppose this would help with a case where I'd want 11ty to build /2021/* and /2003, /2004, etc are built on demand? Unless I made a serverless function called 2003 (and so forth ;)