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 new site for existing directory #4825

Closed
danburzo opened this issue Jun 6, 2018 · 6 comments · Fixed by #6494
Closed

hugo new site for existing directory #4825

danburzo opened this issue Jun 6, 2018 · 6 comments · Fixed by #6494
Labels

Comments

@danburzo
Copy link

danburzo commented Jun 6, 2018

Not something very important, but is there a reason why hugo new site would not work with an existing directory? My instinctual workflow is to create a new Github repo, clone it to my computer, and add Hugo to it.

@danburzo
Copy link
Author

danburzo commented Jun 6, 2018

I'm sorry, I 'll show myself out. It's only when I looked in the source code that I noticed the --force flag. 😬

@danburzo danburzo closed this as completed Jun 6, 2018
@netbuddha
Copy link

I'm sorry, I 'll show myself out. It's only when I looked in the source code that I noticed the --force flag. 😬

A year later and I am out the same door....

@marvinschopf
Copy link

Me too 😄

@BrendanBall
Copy link

imho this isn't very obvious. Other projects have the convention of --here so that it creates in the current directory instead of creating a new subdirectory.

bep pushed a commit that referenced this issue Nov 11, 2019
Many users seem to stumble over creating new sites in existing non-empty directories. And that `--force` is the necessary option. So I added *See --force* as a hint to the error.

Fixes #4825.
@share-dev
Copy link

hugo new site . --force

@github-actions
Copy link

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 Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants