Update usage.md

Closes #1024
This commit is contained in:
Bjørn Erik Pedersen 2020-01-27 18:41:20 +01:00 committed by GitHub
parent a04bab2b92
commit 696543e13d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,23 +203,6 @@ Since Hugo generates a static website, your site can be hosted *anywhere* using
Running `hugo` *does not* remove generated files before building. This means that you should delete your `public/` directory (or the publish directory you specified via flag or configuration file) before running the `hugo` command. If you do not remove these files, you run the risk of the wrong files (e.g., drafts or future posts) being left in the generated site.
{{% /warning %}}
### Dev vs Deploy Destinations
Hugo does not remove generated files before building. An easy workaround is to use different directories for development and production.
To start a server that builds draft content (helpful for editing), you can specify a different destination; e.g., a `dev/` directory:
```
hugo server -wDs ~/Code/hugo/docs -d dev
```
When the content is ready for publishing, use the default `public/` dir:
```
hugo -s ~/Code/hugo/docs
```
This prevents draft content from accidentally becoming available.
[commands]: /commands/
[config]: /getting-started/configuration/