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

Supress "missing static" ERROR when static exists in theme #2311

Closed
anagio opened this issue Jul 29, 2016 · 2 comments · Fixed by #2344
Closed

Supress "missing static" ERROR when static exists in theme #2311

anagio opened this issue Jul 29, 2016 · 2 comments · Fixed by #2344

Comments

@anagio
Copy link
Contributor

anagio commented Jul 29, 2016

After uploading a hugo site to a repo someone who cloned it ran hugo server -w and got this error ERROR: 2016/07/28 23:33:38 hugo.go:637: Walker: lstat /Users/.../testhugo/static: no such file or directory

It was because I did not include the root level static folder in the repo. The theme however has a static folder which is where all the static assets live. Should I be placing static assets into the root static folder and not within the theme static folder?

I do not have a root level archetypes and got no errors about it. What's the reason the static folder is required?

@bep
Copy link
Member

bep commented Jul 29, 2016

I think you currently need a /static folder even if it is empty. So if your files iive in the theme, just create a dummy /static (with a .gitkeep file or something) in the root.

We should fix this. There is no real reason the static is required (at least one static folder is requred, I guess ...)

@bep bep added the Bug label Jul 29, 2016
@bep bep changed the title ERROR: hugo.go:637: Walker: lstat /Users/.../testhugo/static: no such file or directory Supress "missing static" ERROR when static exists in theme Jul 29, 2016
ks888 added a commit to ks888/hugo that referenced this issue Aug 9, 2016
@bep bep closed this as completed in #2344 Aug 13, 2016
bep pushed a commit that referenced this issue Aug 13, 2016
tychoish pushed a commit to tychoish/hugo that referenced this issue Aug 13, 2017
@github-actions
Copy link

github-actions bot commented Apr 4, 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 Apr 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants