02. April 2014
Go to Hugo releases and download the appropriate version for your OS and architecture.
Save it somewhere specific as we will be using it in the next step.
More complete instructions are available at Install Hugo
Hugo has its own example site which happens to also be the documentation site you are reading right now.
Follow the following steps:
Corresponding pseudo commands:
1 git clone https://github.com/spf13/hugo 2 cd hugo 3 /path/to/where/you/installed/hugo server --source=./docs 4 > 29 pages created 5 > 0 tags index created 6 > in 27 ms 7 > Web Server is available at http://localhost:1313 8 > Press ctrl+c to stop
Once you've gotten here, follow along the rest of this page on your local build.
Stop the Hugo process by hitting Ctrl+C.
Now we are going to run hugo again, but this time with hugo in watch mode.
1 /path/to/hugo/from/step/1/hugo server --source=./docs --watch 2 > 29 pages created 3 > 0 tags index created 4 > in 27 ms 5 > Web Server is available at http://localhost:1313 6 > Watching for changes in /Users/spf13/Code/hugo/docs/content 7 > Press ctrl+c to stop
Open your favorite editor and change one of the source content pages. How about changing this very file to fix the typo. How about changing this very file to fix the typo.
Content files are found in
docs/content/. Unless otherwise specified, files
are located at the same relative location as the url, in our case
Change and save this file.. Notice what happened in your terminal.
1 > Change detected, rebuilding site 2 3 > 29 pages created 4 > 0 tags index created 5 > in 26 ms
Refresh the browser and observe that the typo is now fixed.
Notice how quick that was. Try to refresh the site before it's finished building. I double dare you. Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.
The best way to learn something is to play with it.