mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
docs: Clarify Usage
This commit is contained in:
parent
2530087ab1
commit
81f04ef4f0
1 changed files with 20 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
aliases:
|
aliases:
|
||||||
- /doc/usage/
|
- /doc/usage/
|
||||||
lastmod: 2016-08-09
|
lastmod: 2016-08-19
|
||||||
date: 2013-07-01
|
date: 2013-07-01
|
||||||
menu:
|
menu:
|
||||||
main:
|
main:
|
||||||
|
@ -13,7 +13,7 @@ title: Using Hugo
|
||||||
weight: 30
|
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
|
{{< nohighlight >}}$ hugo help
|
||||||
|
|
||||||
|
@ -126,13 +126,17 @@ Press Ctrl+C to stop
|
||||||
## Deploying your web site
|
## Deploying your web site
|
||||||
|
|
||||||
After running `hugo server` for local web development,
|
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
|
you need to do a final `hugo` run
|
||||||
(by FTP, SFTP, WebDAV, Rsync, git push, etc.) to your production web server.
|
**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,
|
Since Hugo generates a static website, your site can be hosted anywhere,
|
||||||
including [Heroku][], [GoDaddy][], [DreamHost][], [GitHub Pages][],
|
including [Heroku][], [GoDaddy][], [DreamHost][], [GitHub Pages][],
|
||||||
[Amazon S3][] and [CloudFront][], or any other cheap or even free
|
[Amazon S3][] with [CloudFront][],
|
||||||
static web hosting services.
|
or any other cheap (or even free) static web hosting service.
|
||||||
|
|
||||||
[Apache][], [nginx][], [IIS][]... Any web server software would do!
|
[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 >}}$ hugo -s ~/Code/hugo/docs
|
||||||
{{< /nohighlight >}}
|
{{< /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!
|
### Alternatively, serve your web site with Hugo!
|
||||||
|
|
||||||
|
@ -182,7 +187,14 @@ Here is the command:
|
||||||
--bind=87.245.198.50
|
--bind=87.245.198.50
|
||||||
{{< /nohighlight >}}
|
{{< /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,
|
This way, you may actually deploy just the source files,
|
||||||
and Hugo on your server will generate the resulting web site
|
and Hugo on your server will generate the resulting web site
|
||||||
|
|
Loading…
Reference in a new issue