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

Added support for multiple config files via --config a.toml,b.toml,c.toml #3532

Merged
merged 2 commits into from
Aug 9, 2017
Merged

Added support for multiple config files via --config a.toml,b.toml,c.toml #3532

merged 2 commits into from
Aug 9, 2017

Conversation

jgielstra
Copy link
Contributor

@jgielstra jgielstra commented May 26, 2017

Our team needs multiple configs for the same doc site to support different delivery channels.
We'd like to have a base config.toml and one or more child config.tomls overriding properties in the config.

I didn't see support for repeating command-line options in Cobra.
I've added the ability pass multiple config files via --config as a comma delimited string.
For example: hugo --config=base.toml,child1.toml,child2.toml
Use viper's MergeConfig() to merge changes.

…toml,another.toml

Use viper's MergeConfig() to merge changes
go fmt update
@CLAassistant
Copy link

CLAassistant commented May 26, 2017

CLA assistant check
All committers have signed the CLA.

@bep
Copy link
Member

bep commented May 26, 2017

3 things:

  1. You need to hit the "sign CLA button"
  2. How does this work with live-reloading?
  3. This needs a test.

@jgielstra
Copy link
Contributor Author

It seems I have done the CLA ??
If I click the CLA badge (https://cla-assistant.io/spf13/hugo?pullRequest=3532) I see..
"You have signed the CLA for spf13/hugo"

@n10v
Copy link
Contributor

n10v commented May 26, 2017

I don't see, what you signed the CLA too

@bep
Copy link
Member

bep commented May 26, 2017

@jgielstra then I think there is a mismatch between your commit email and the email you have registered on your GitHub account. You can add multiple email addresses in your GH profile to handle this issue.

@jgielstra
Copy link
Contributor Author

Thx that was indeed the case ..

@jgielstra jgielstra closed this May 27, 2017
@jgielstra jgielstra reopened this May 27, 2017
@bep
Copy link
Member

bep commented Jul 22, 2017

@jgielstra sorry about letting this drag out; it is maybe because of the move to a GitHub org, but the CLA still shows up as "not signed".

@jgielstra
Copy link
Contributor Author

jgielstra commented Jul 24, 2017 via email

@bep
Copy link
Member

bep commented Jul 24, 2017

@spf13 @moorereason @digitalcraftsman and others: This seems like a great addition and I cannot think of a reason why this should bite us in the ass in the future?

@digitalcraftsman
Copy link
Member

I like the idea of @jgielstra.

But I would like to turn the spotlight #3090 as well. It proposes to optionally externalize the site config into the data folder. This goes somewhere in the same direction.

In #3090 we literally split up a config file in smaller pieces. Using hugo --config would make it hard so say what files belong which configuration.

I just want to make sure we can incorporate both approaches.

@bep bep merged commit 0f9f73c into gohugoio:master Aug 9, 2017
@bep
Copy link
Member

bep commented Aug 9, 2017

@jgielstra I have merged this, but it would also be nice to have a line or two in the documentation somewhere about this, and a PR for that (in this repo) would be welcomed.

@digitalcraftsman
Copy link
Member

Is this feature still undocumented? If so we should open an issue for it.

@bep
Copy link
Member

bep commented Aug 17, 2017

Is this feature still undocumented?

Yes. Lesson learned: Never merge PRs without doc.

@digitalcraftsman
Copy link
Member

I've opened an issue as a reminder to document it.

gohugoio/hugoDocs#146

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants