Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to override configuration (e.g. from CLI) #60

Open
denisdefreyne opened this issue Mar 30, 2021 · 0 comments
Open

Ability to override configuration (e.g. from CLI) #60

denisdefreyne opened this issue Mar 30, 2021 · 0 comments

Comments

@denisdefreyne
Copy link
Member

See https://gitlab.com/gitlab-org/gitlab-docs/-/issues/81#note_540515256.

Being able to override configuration bits could make sense for data sources, where different machines might have their data stored in different locations.

Some ideas for how to do that:

  • Interpret ERB in the configuration file. This would not be a backwards-compatible change.

  • Introduce a syntax for specifying values coming from environment variables, e.g. content_dir: @@ENV['NANOC_CONTENT_DIR']. Feels hacky.

  • Allow specifying config overrides via the CLI, e.g. nanoc co --config-override=data_sources[0].content_dir=../somewhereelse. With data sources being an array, this is a little brittle, having to specify [0] rather than something more descriptive.

(Add your own ideas in the comments.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant