Source code for website arcusiridis.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.5 KiB

5 years ago
  1. +++
  2. title = "Getting Started with Hugo"
  3. description = ""
  4. tags = [
  5. "go",
  6. "golang",
  7. "hugo",
  8. "development",
  9. ]
  10. date = "2014-04-02"
  11. categories = [
  12. "Development",
  13. "golang",
  14. ]
  15. +++
  16. ## Step 1. Install Hugo
  17. Go to [Hugo releases](https://github.com/spf13/hugo/releases) and download the
  18. appropriate version for your OS and architecture.
  19. Save it somewhere specific as we will be using it in the next step.
  20. More complete instructions are available at [Install Hugo](https://gohugo.io/getting-started/installing/)
  21. ## Step 2. Build the Docs
  22. Hugo has its own example site which happens to also be the documentation site
  23. you are reading right now.
  24. Follow the following steps:
  25. 1. Clone the [Hugo repository](http://github.com/spf13/hugo)
  26. 2. Go into the repo
  27. 3. Run hugo in server mode and build the docs
  28. 4. Open your browser to http://localhost:1313
  29. Corresponding pseudo commands:
  30. git clone https://github.com/spf13/hugo
  31. cd hugo
  32. /path/to/where/you/installed/hugo server --source=./docs
  33. > 29 pages created
  34. > 0 tags index created
  35. > in 27 ms
  36. > Web Server is available at http://localhost:1313
  37. > Press ctrl+c to stop
  38. Once you've gotten here, follow along the rest of this page on your local build.
  39. ## Step 3. Change the docs site
  40. Stop the Hugo process by hitting Ctrl+C.
  41. Now we are going to run hugo again, but this time with hugo in watch mode.
  42. /path/to/hugo/from/step/1/hugo server --source=./docs --watch
  43. > 29 pages created
  44. > 0 tags index created
  45. > in 27 ms
  46. > Web Server is available at http://localhost:1313
  47. > Watching for changes in /Users/spf13/Code/hugo/docs/content
  48. > Press ctrl+c to stop
  49. Open your [favorite editor](http://vim.spf13.com) and change one of the source
  50. content pages. How about changing this very file to *fix the typo*. How about changing this very file to *fix the typo*.
  51. Content files are found in `docs/content/`. Unless otherwise specified, files
  52. are located at the same relative location as the url, in our case
  53. `docs/content/overview/quickstart.md`.
  54. Change and save this file.. Notice what happened in your terminal.
  55. > Change detected, rebuilding site
  56. > 29 pages created
  57. > 0 tags index created
  58. > in 26 ms
  59. Refresh the browser and observe that the typo is now fixed.
  60. Notice how quick that was. Try to refresh the site before it's finished building. I double dare you.
  61. Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.
  62. ## Step 4. Have fun
  63. The best way to learn something is to play with it.