Clarification needed - non-default configDir

I have the following config.toml that sits in my project’s rootdir, which is sveltedev:

    baseURL = "http://example.org/"
    languageCode = "en-us"
    title = "Hugo Svelte POC"
    archetypeDir = "visible/svelte/archetypes"
    assetDir = "visible/svelte/assets"
    configDir = "visible/svelte/config"
    contentDir = "visible/svelte/content"
    dataDir = "visible/svelte/data"
    enableInlineShortcodes = true
    layoutDir = "visible/svelte/layouts"
    publishDir = "visible/svelte/public"
    relativeURLs = true
    resourceDir = "visible/svelte/resources"
    staticDir = "visible/svelte/static"
    themesDir = "visible/svelte/themes"

As you see, I have a configDir declared. I’ve put in it a subfolder _default and in the subfolder I have just a menus.json copied from here.
My problem:
What’s in the config dir is not read, nor monitored for changes.
When I run hugo server from my project root dir, which is sveltedev, I get

Watching for changes in /sveltedev/visible/svelte/{archetypes,assets,content,data,layouts,static}
Watching for config changes in /sveltedev/config.toml
Environment: "development"
Serving pages from memory

Even if I run hugo server --configDir='visible/svelte/config' nothing changes.
Am I doing smth wrong?
Is there a way to monitor for changes the configDir?

FYI I did read
Directory Structure
Basic Usage
Configure Hugo
And all in the docs related to Menus

I can not see, and am unable to reproduce. Please share your repo and follow the other advice at Requesting Help.

my question was theoretical.
Never mind, I’ll figure it myself eventually.
Cheers!

We don’t field theoretical questions; you can test your theories locally, so your questions should be actual. Please. :slight_smile:

Seriously?!?

FYI, I solved the issue. I’ll post the solution later on.

It turns out that configDir has no effect when included in config.toml. Instead, it needs to be used on the command line.
So, in my case, running hugo server --configDir visible/svelte/config (without any quotes surrounding the path string) has the desired effects:

Watching for config changes in /sveltedev/config.toml, /sveltedev/visible/svelte/config/_default

So, both config.toml in the root dir of my project plus everything in the configDir are read and watched.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.