Skip to content

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

@denisdefreyne

Description

@denisdefreyne

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions