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

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

Closed
mdwhatcott opened this issue Jun 10, 2014 · 18 comments
Closed

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

mdwhatcott opened this issue Jun 10, 2014 · 18 comments

Comments

@mdwhatcott
Copy link
Contributor

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
Copy link

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
Copy link

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
Copy link
Contributor Author

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
Copy link

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
Copy link
Contributor

spf13 commented Jun 27, 2014

This is definitely a bug. Will be fixed soon.

@mdwhatcott
Copy link
Contributor Author

@spf13 - Cool, thanks!

@IbnSaeed
Copy link

@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 as completed in bf9595a Jul 2, 2014
spf13 added a commit that referenced this issue Jul 2, 2014
@zachdyer
Copy link

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
Copy link
Contributor

spf13 commented May 7, 2015

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

@zachdyer
Copy link

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
Copy link

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
Copy link
Contributor

dunn commented May 7, 2015

are you missing the static directory in your project?

@zachdyer
Copy link

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
Copy link

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
Copy link
Member

bep commented May 7, 2015

Inside /content, probably.

@zachdyer
Copy link

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?

@ashankar-fiserv
Copy link

I still have a problem with config files with non-standard names.

When I use it with the "hugo new" command, I get errors about not being able to find the "themes" directory. Specifying the "themes" directory in the config file or in the command line doesn't make any difference.

When I divide a hugo site directory into multiple directories and use a config file with a non-standard name, same thing. I have errors about not being able to find the "themes" directory.

@github-actions
Copy link

github-actions bot commented Mar 2, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants