Skip to content

Loading…

Hugo 0.11 can't see config file with non-default name #328

Closed
mdwhatcott opened this Issue · 16 comments

7 participants

@mdwhatcott

I've separated my sites into a few separate repositories. The repository in charge of rendering and publishing my sites has all my config files, named after the site they configure. These config files point to the other repositories which contain the markup/templates and content. Up until now (0.11) I've used the --config flag to point to the correct config file but it's not working anymore:

$ hugo_0.11 server --config=my-site.yaml
ERROR: 2014/06/09 Config not found... using only defaults, stuff may not work
...

Renaming the config file to config.yaml makes it work again but this appears to be a breaking change from 0.10.

@sondr3

Just wanted to chime in and say the same thing, I have 0.11 on OS X 10.9.3 and I have the same thing. Would be great if this could be fixed soonish. Thanks! :)

@sondr3

Seems I spoke too quickly, I think I have figured it out. When I run it as @mdwhatcott mentions it throws an error:

$ hugo server --config=site.toml --theme=hyde --buildDrafts
ERROR: 2014/06/20 Config not found... using only defaults, stuff may not work

However, if you run --config without mentioning what format the config is in, it works:

$ hugo server --config=site --theme=hyde --buildDrafts
2 pages created [...]

I confirmed this workes with both a YAML and a TOML file, and it works. Hope it helps. :+1:

@mdwhatcott

Indeed @sondr3 is correct! This seems weird, and is still a breaking change, but I'll now move forward with Hugo 0.11. Thanks for discovering the workaround!

@IbnSaeed

I am having a similar problem in windows 8.1 64 bit

after creating a new project with hugo new site /path/to/.site

cd to new site path

run hugo new about.md

it gives the following error messaage

$ hugo new about.md
ERROR: 2014/06/27 Config not found... using only defaults, stuff may not work
D:\hugo\content\about.md created

@spf13
Owner

This is definitely a bug. Will be fixed soon.

@mdwhatcott

@spf13 - Cool, thanks!

@IbnSaeed

@spf13 Looking forward to it, for the time being i wont be using hugo and instead try out Frog static site generator.

@spf13 spf13 closed this in bf9595a
@zachdyer

When I use hugo server it gives me the error Config not found... using only defaults, stuff may not work. I'm using version 0.13. Also there is a second error Unable to find Static Directory.... I'm using the hugo binary in my project folder. Is this a path error of some type?

@spf13
Owner

You need to run hugo in a folder with a config.{yaml, toml, json} file

@zachdyer

I did but I updated my comment with the second error. Did you see that? That is an old version of hugo that it's pointing to. I'm sorry I thought it would use the hugo binary in my current directory.

@zachdyer

Weird hugo is looking into a path for hugo that isn't in my path variable. Now I'm just confused. Any idea's on how to troubleshoot? The error is saying Unable to find Static Directory: in E:\Cloud\Google Drive\bin\Hugo\static/. However this path isn't in my environmental path.

@dunn

are you missing the static directory in your project?

@zachdyer

No it's there. But why is hugo using the wrong version? How do I tell Hugo to use the current version. I've tried updating my environmental variable.

@zachdyer

I updated the old path with the new Hugo binary 0.13 and now I get a different error when I use hugo server Failed to read data from desktop.ini/desktop.ini: Data not supported for extension 'ini'. Where is that file located?

@bep
Collaborator
bep commented

Inside /content, probably.

@zachdyer

Aha I found it. It was hidden from me. This file was created by Google drive sync. @spf13 What should I do about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.