diff options
author | spf13 <steve.francia@gmail.com> | 2013-07-19 11:38:24 +0400 |
---|---|---|
committer | spf13 <steve.francia@gmail.com> | 2013-07-19 11:38:24 +0400 |
commit | 627cf26571cbbe7a1a02439a3d7b7b4dce8ad066 (patch) | |
tree | 7b580f2abcb43ef012bb0c5f0142828100c2b495 /README.md | |
parent | 8fae5f0dd68476ae1e58704abccb61a34a2989df (diff) |
Adding proper command line option parsing
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 33 |
1 files changed, 23 insertions, 10 deletions
@@ -168,15 +168,17 @@ Make sure either hugo is in your path or provide a path to it. $ hugo --help usage: hugo [flags] [] - -b="": hostname (and path) to the root eg. http://spf13.com/ - -c="config.json": config file (default is path/config.json) - -d=false: include content marked as draft - -h=false: show this help - -k=false: analyze content and provide feedback - -p="": filesystem path to read files relative from - -w=false: watch filesystem for changes and recreate as needed - -s=false: a (very) simple webserver - -port="1313": port for webserver to run on + -b, --base-url="": hostname (and path) to the root eg. http://spf13.com/ + -d, --build-drafts=false: include content marked as draft + --config="": config file (default is path/config.yaml|json|toml) + -h, --help=false: show this help + --port="1313": port to run web server on, default :1313 + -S, --server=false: run a (very) simple web server + -s, --source="": filesystem path to read files relative from + --uglyurls=false: use /filename.html instead of /filename/ + -v, --verbose=false: verbose output + --version=false: which version of hugo + -w, --watch=false: watch filesystem for changes and recreate as needed The most common use is probably to run hugo with your current directory being the input directory. @@ -192,8 +194,19 @@ immediately, tell Hugo to watch for changes. **It will recreate the site faster than you can tab over to your browser to view the changes.** - $ hugo -p ~/mysite -w + $ hugo --source ~/mysite --watch + Watching for changes. Press ctrl+c to stop + 15 pages created + 0 tags created +Hugo can even run a server and create your site at the same time! + + $hugo --server -ws ~/mysite + Watching for changes. Press ctrl+c to stop + 15 pages created + 0 tags created + Web Server is available at http://localhost:1313 + Press ctrl+c to stop # Layout |