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

Closed
mdwhatcott opened this Issue Jun 10, 2014 · 16 comments

Comments

Projects
None yet
7 participants
@mdwhatcott
Contributor

mdwhatcott commented Jun 10, 2014

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

This comment has been minimized.

Show comment
Hide comment
@sondr3

sondr3 Jun 20, 2014

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 commented Jun 20, 2014

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

This comment has been minimized.

Show comment
Hide comment
@sondr3

sondr3 Jun 20, 2014

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. 👍

sondr3 commented Jun 20, 2014

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. 👍

@mdwhatcott

This comment has been minimized.

Show comment
Hide comment
@mdwhatcott

mdwhatcott Jun 20, 2014

Contributor

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!

Contributor

mdwhatcott commented Jun 20, 2014

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

This comment has been minimized.

Show comment
Hide comment
@IbnSaeed

IbnSaeed Jun 27, 2014

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

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

This comment has been minimized.

Show comment
Hide comment
@spf13

spf13 Jun 27, 2014

Contributor

This is definitely a bug. Will be fixed soon.

Contributor

spf13 commented Jun 27, 2014

This is definitely a bug. Will be fixed soon.

@mdwhatcott

This comment has been minimized.

Show comment
Hide comment
@mdwhatcott

mdwhatcott Jun 28, 2014

Contributor

@spf13 - Cool, thanks!

Contributor

mdwhatcott commented Jun 28, 2014

@spf13 - Cool, thanks!

@IbnSaeed

This comment has been minimized.

Show comment
Hide comment
@IbnSaeed

IbnSaeed Jun 28, 2014

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

@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 Jul 2, 2014

spf13 added a commit that referenced this issue Jul 2, 2014

@zachdyer

This comment has been minimized.

Show comment
Hide comment
@zachdyer

zachdyer May 7, 2015

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?

zachdyer commented May 7, 2015

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

This comment has been minimized.

Show comment
Hide comment
@spf13

spf13 May 7, 2015

Contributor

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

Contributor

spf13 commented May 7, 2015

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

@zachdyer

This comment has been minimized.

Show comment
Hide comment
@zachdyer

zachdyer May 7, 2015

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 commented May 7, 2015

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

This comment has been minimized.

Show comment
Hide comment
@zachdyer

zachdyer May 7, 2015

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.

zachdyer commented May 7, 2015

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

This comment has been minimized.

Show comment
Hide comment
@dunn

dunn May 7, 2015

Contributor

are you missing the static directory in your project?

Contributor

dunn commented May 7, 2015

are you missing the static directory in your project?

@zachdyer

This comment has been minimized.

Show comment
Hide comment
@zachdyer

zachdyer May 7, 2015

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 commented May 7, 2015

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

This comment has been minimized.

Show comment
Hide comment
@zachdyer

zachdyer May 7, 2015

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?

zachdyer commented May 7, 2015

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

This comment has been minimized.

Show comment
Hide comment
@bep

bep May 7, 2015

Member

Inside /content, probably.

Member

bep commented May 7, 2015

Inside /content, probably.

@zachdyer

This comment has been minimized.

Show comment
Hide comment
@zachdyer

zachdyer May 7, 2015

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

zachdyer commented May 7, 2015

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