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

Add cli config flag mergin possibility #323

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/commands/hugo.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ hugo [flags]
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
--canonifyURLs if true, all relative URLs will be canonicalized using baseURL
--cleanDestinationDir remove files from destination not found in static directories
--config string config file (default is path/config.yaml|json|toml)
--config string config file(s), multiple files (a.toml,b.toml.c.toml) will be merged (default is path/config.yaml|json|toml)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The content below /commands is autogenerated from code and this will be overwritten eventually.

Copy link
Contributor

@kaushalmodi kaushalmodi Feb 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to have:

### Options
<!-- Do NOT edit this section manually, it is auto-generated by ?? -->

?

(where ?? be replaced with whatever is auto-generating this part.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.
If it's not about to be overwritten tomorrow, we could still add it and have you or me (depending on the complexity) modify the sentence directly to the hugo command --help function ?
I was about to look into adding the sentence to the cli --help anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-c, --contentDir string filesystem path to content directory
--debug debug output
-d, --destination string filesystem path to write files to
Expand Down
9 changes: 9 additions & 0 deletions content/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,15 @@ $ env HUGO_TITLE="Some Title" hugo
Names must be prefixed with `HUGO_` and the configuration key must be set in uppercase when setting operating system environment variables.
{{% /note %}}

## Merge Mutliple Configurations

You can merge serveral configuration files using the Hugo cli flag `--config`. This can be useful to share common properties among serveral environements.

```
$ hugo --config base.config.toml,prod.config.toml
```


## Ignore Files When Rendering

The following statement inside `./config.toml` will cause Hugo to ignore files ending with `.foo` and `.boo` when rendering:
Expand Down