data from the command-line #4091
Replies: 4 comments
-
|
What would block you from using environment variables here? |
Beta Was this translation helpful? Give feedback.
-
|
@Ryuno-Ki I must not be understanding your question because my workaround is to use environment variables, but it seems at best inelegant. Nothing would block me from using environment variables. My suggestion is that it would be useful to allow data overrides to be specified at the command line. |
Beta Was this translation helpful? Give feedback.
-
|
Ah I’m not sure about this one, hmm. I will put it into the queue but this seems pretty limited compared to the workaround you’re using! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
I am running eleventy in development and from netlify. I'd like the ability to inject some data from the environment into my templates.
Describe the solution you'd like
A command line option to the
eleventycommand to either specify a file with data (json/js/etc) or specify k/v pairs on the command line.e.g.
eleventy --data baseUrl=$DEPLOY_PRIMEURLDescribe alternatives you've considered
Here's how I worked around it with javascript data in a file I called
_data/site.json:Beta Was this translation helpful? Give feedback.
All reactions