mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-22 00:28:16 +00:00
Docs: improve usage.md
This commit is contained in:
parent
37676a25c6
commit
ffb1a96e76
1 changed files with 5 additions and 8 deletions
|
@ -89,7 +89,7 @@ ready to be deployed to your web server.
|
||||||
If you are working on things and want to see the changes immediately, tell Hugo to watch for changes.
|
If you are working on things and want to see the changes immediately, tell Hugo to watch for changes.
|
||||||
Hugo will watch the filesystem for changes, and rebuild your site as soon as a file is saved:
|
Hugo will watch the filesystem for changes, and rebuild your site as soon as a file is saved:
|
||||||
|
|
||||||
$ hugo -s ~/Code/hugo/docs --watch
|
$ hugo -s ~/Code/hugo/docs
|
||||||
0 draft content
|
0 draft content
|
||||||
0 future content
|
0 future content
|
||||||
99 pages created
|
99 pages created
|
||||||
|
@ -122,9 +122,7 @@ This is the easiest and most common way to develop a Hugo web site:
|
||||||
## 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**
|
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
|
||||||
and **without `--watch` or `-w`** 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.
|
(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,
|
||||||
|
@ -153,11 +151,11 @@ An easy way to work around this is to use different directories for development
|
||||||
|
|
||||||
To start a server that builds draft content (helpful for editing), you can specify a different destination: the `dev/` dir.
|
To start a server that builds draft content (helpful for editing), you can specify a different destination: the `dev/` dir.
|
||||||
|
|
||||||
hugo server -wDs ~/Code/hugo/docs -d dev
|
$ hugo server -wDs ~/Code/hugo/docs -d dev
|
||||||
|
|
||||||
When the content is ready for publishing, use the default `public/` dir:
|
When the content is ready for publishing, use the default `public/` dir:
|
||||||
|
|
||||||
hugo -s ~/Code/hugo/docs
|
$ hugo -s ~/Code/hugo/docs
|
||||||
|
|
||||||
This prevents content you're not ready to share yet from accidentally becoming available.
|
This prevents content you're not ready to share yet from accidentally becoming available.
|
||||||
|
|
||||||
|
@ -172,8 +170,7 @@ No other web server software (Apache, nginx, IIS...) is necessary.
|
||||||
|
|
||||||
Here is the command:
|
Here is the command:
|
||||||
|
|
||||||
hugo server --watch \
|
$ hugo server --baseURL=http://yoursite.org/ --port=80 \
|
||||||
--baseURL=http://yoursite.org/ --port=80 \
|
|
||||||
--appendPort=false \
|
--appendPort=false \
|
||||||
--bind=87.245.198.50
|
--bind=87.245.198.50
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue