Merge commit '3c0036805d64fdd8290f1c4a31371780ff3ea365'

This commit is contained in:
Bjørn Erik Pedersen
2020-02-06 13:03:30 +01:00
93 changed files with 137 additions and 214 deletions

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/