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

contentDir parameter in config takes precedence over the same CLI flag #5662

Open
onedrawingperday opened this Issue Jan 31, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@onedrawingperday
Copy link
Member

onedrawingperday commented Jan 31, 2019

Following the recent enforcement of the Hugo Basic Example contentDir in the Build Script of the Hugo Themes site I discovered that if this parameter is present in the config of an Example Site then Hugo picks up what is entered in the config and not the CLI flag in the Build Script.

So far I have found one theme with a contentDir parameter. As a result its demo is published using the content that the author wants and not what the Build Script uses.

(Note that even though the above theme uses multilingual features this doesn't matter. I tested with other themes locally and if I enter this parameter in the Example Site config of any theme then again it takes precedence over the CLI flag.)

We don't quite want that anymore for the Hugo Themes website, after the recent cases of inappropriate content.

Would it be feasible to have the CLI flag take precedence over the config?

cc: @digitalcraftsman

@bep bep added the Bug label Jan 31, 2019

@bep bep self-assigned this Jan 31, 2019

@bep bep added this to the v0.53.1 milestone Jan 31, 2019

bep added a commit that referenced this issue Feb 1, 2019

@bep

This comment has been minimized.

Copy link
Member

bep commented Feb 1, 2019

I started adding a failing test for this, that didn't fail. And then I looked at your example. The thing is:

  • --configDir sets the main configDir setting, which works
  • But then you can set a configDir per language

I need to think a little about this, but in a theme context, it would not make much sense to use the same content for each language ...

@bep bep modified the milestones: v0.53.1, v0.54 Feb 1, 2019

@bep bep added NeedsInvestigation and removed Bug labels Feb 1, 2019

@bep bep modified the milestones: v0.54, v0.55 Feb 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment