You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by btrem February 7, 2024
I have several plugins in my site setup, which are listed in the eleventyConfig in a plugins array (shortened for ease of reading):
One of my plugins has a pluginConfig that I can access via eleventyConfig.plugins[1].options.foo. Can I find this particular property directly? I.e., is there a way to access the plugin via it's name in the .eleventy.js addPlugin directive? I tried JSON.stringify(eleventyConfig.plugins["myPlugin"]) and got undefined.
The text was updated successfully, but these errors were encountered:
[meta: I replied to this logged into a sibling's GH account; I apologize for my carelessness]
The options are passed in to the plugin as that link describes, and are available in the main plugin file, e.g. myPlugin/index.js. But how do I access the options object in other files? In my case, specifically, in other files that are part of the plugin, e.g., myPlugin/myFilter.js?
Discussed in #3193
Originally posted by btrem February 7, 2024
I have several plugins in my site setup, which are listed in the
eleventyConfig
in aplugins
array (shortened for ease of reading):One of my plugins has a
pluginConfig
that I can access viaeleventyConfig.plugins[1].options.foo
. Can I find this particular property directly? I.e., is there a way to access the plugin via it's name in the .eleventy.jsaddPlugin
directive? I triedJSON.stringify(eleventyConfig.plugins["myPlugin"])
and got undefined.The text was updated successfully, but these errors were encountered: