docs: Clarify Usage

This commit is contained in:
Mark D. Blackwell 2016-08-10 15:18:03 -04:00
parent 2530087ab1
commit 81f04ef4f0

View file

@ -1,7 +1,7 @@
---
aliases:
- /doc/usage/
lastmod: 2016-08-09
lastmod: 2016-08-19
date: 2013-07-01
menu:
main:
@ -13,7 +13,7 @@ title: Using Hugo
weight: 30
---
Make sure Hugo is in your `PATH` (or provide a path to it). Test it with:
Make sure Hugo is in your `PATH` (or provide a path to it). Test this by:
{{< nohighlight >}}$ hugo help
@ -126,13 +126,17 @@ Press Ctrl+C to stop
## Deploying your web site
After running `hugo server` for local web development,
you need to do a final `hugo` run **without the `server` command** to rebuild your site. You may then **deploy your site** by copying the `public/` directory
(by FTP, SFTP, WebDAV, Rsync, git push, etc.) to your production web server.
you need to do a final `hugo` run
**without the `server` part of the command**
to rebuild your site.
You may then **deploy your site** by copying the `public/` directory
(by FTP, SFTP, WebDAV, Rsync, `git push`, etc.)
to your production web server.
Since Hugo generates a static website, your site can be hosted anywhere,
including [Heroku][], [GoDaddy][], [DreamHost][], [GitHub Pages][],
[Amazon S3][] and [CloudFront][], or any other cheap or even free
static web hosting services.
[Amazon S3][] with [CloudFront][],
or any other cheap (or even free) static web hosting service.
[Apache][], [nginx][], [IIS][]... Any web server software would do!
@ -163,7 +167,8 @@ When the content is ready for publishing, use the default `public/` dir:
{{< nohighlight >}}$ hugo -s ~/Code/hugo/docs
{{< /nohighlight >}}
This prevents content you're not ready to share yet from accidentally becoming available.
This prevents content you're not yet ready to share
from accidentally becoming available.
### Alternatively, serve your web site with Hugo!
@ -182,7 +187,14 @@ Here is the command:
--bind=87.245.198.50
{{< /nohighlight >}}
Note the `bind` option, which is the interface to which the server will bind (defaults to `127.0.0.1`, which is fine for most development use cases). Some hosts, like Amazon Web Services, runs network address translation and it can sometimes be hard to figure out the actual IP address. Using `--bind=0.0.0.0` will bind to all interfaces.
Note the `bind` option,
which is the interface to which the server will bind
(defaults to `127.0.0.1`:
fine for most development use cases).
Some hosts, such as Amazon Web Services,
run NAT (network address translation);
sometimes it can be hard to figure out the actual IP address.
Using `--bind=0.0.0.0` will bind to all interfaces.
This way, you may actually deploy just the source files,
and Hugo on your server will generate the resulting web site