# Simplest configDir structure

**URL:** <https://discourse.gohugo.io/t/simplest-configdir-structure/16320>\
**Category:** support\
**Created:** [January 11, 2019, 2:53pm UTC](https://discourse.gohugo.io/t/simplest-configdir-structure/16320 "2019-01-11T14:53:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_nm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/_nm/32/7662_2.png) [@\_nm](https://discourse.gohugo.io/u/_nm)\
**Post date:** [January 11, 2019, 2:53pm UTC](https://discourse.gohugo.io/t/simplest-configdir-structure/16320/1 "2019-01-11T14:53:05Z")

</div>

I’ve been using this command-line argument when I run hugo:

```auto
--config config.yaml,config-shared.yaml

```

I’d like to switch to using the new configDir and tried this structure:

```auto
config
└── _default
    ├── config.yaml
    └── shared.yaml

```

But it did not work. I don’t need different development and production configs. I just want to partition my config file into multiple files so it’s easier to plug and play the different parts.

What’s the simplest way to structure configDir to do this?

BTW, if you are interested, I wrote about why the name of one of my config files needs to be config.yaml (or .toml or .json) when used after the --config command-line flag here:

> [@How to use a custom config file with huge new command](https://discourse.gohugo.io/t/how-to-use-a-custom-config-file-with-huge-new-command/13089/6):
>
> I am using a newer version, so that might be it, but it works for me: Hugo Static Site Generator v0.45 linux/amd64 BuildDate: 2018-07-22T14:40:41Z If you need more troubleshooting, you’ll have to share your code. slight_smile

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [January 11, 2019, 3:51pm UTC](https://discourse.gohugo.io/t/simplest-configdir-structure/16320/2 "2019-01-11T15:51:19Z")

</div>

Just to rule it out, you’re using version 0.53?

---

<div class="post-metadata">

**Author:** ![\_nm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/_nm/32/7662_2.png) [@\_nm](https://discourse.gohugo.io/u/_nm)\
**Post date:** [January 12, 2019, 2:07pm UTC](https://discourse.gohugo.io/t/simplest-configdir-structure/16320/3 "2019-01-12T14:07:06Z")

</div>

Yes I’m using Hugo v0.53. I’ve done some experiments and I think I’ve figured out that this:

```auto
root
- config.yaml

```

is equivalent to this:

```auto
root
- config
-- _default
--- config.yaml

```

So I think this structure (`config/_default/config.yaml`) is the answer to my original question. Now I have a couple more configDir questions:

1. How do I specify 2 or more config files in the `config/_default` directory. From what I’ve read in the (so far) meager documentation, multiple config files are read lexically, which I assume means they are ordered alphanumerically?
2. I tried setting `--configDir ".."` on the command line because I’d like to pull my config files out of my project root. It seems that this might actually change the project root from the directory I run `hugo` in. Please explain how paths work with `--configDir` and how that is related to the value of the project root directory.

Thank you!
