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.

cli-usage.md 1.1KB

6 years ago
6 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. +++
  2. title = "CLI usage"
  3. weight = 2
  4. +++
  5. Gutenberg only has 3 commands: init, build and serve.
  6. You can view the help of the whole program by running `gutenberg --help` and
  7. the command help by running `gutenberg <cmd> --help`.
  8. ## init
  9. Creates the directory structure used by Gutenberg at the given directory.
  10. ```bash
  11. $ gutenberg init <my_site>
  12. ```
  13. will create a new folder named `my_site` and the files/folders needed by
  14. Gutenberg.
  15. ## build
  16. This will build the whole site in the `public` directory.
  17. ```bash
  18. $ gutenberg build
  19. ```
  20. ## serve
  21. This will build and serve the site using a local server. You can also specify
  22. the interface/port combination to use if you want something different than the default (`127.0.0.1:1111`).
  23. ```bash
  24. $ gutenberg serve
  25. $ gutenberg serve --port 2000
  26. $ gutenberg serve --interface 0.0.0.0
  27. $ gutenberg serve --interface 0.0.0.0 --port 2000
  28. ```
  29. The serve command will watch all your content and will provide live reload, without
  30. hard refresh if possible.
  31. If you fail to see your change, this means that Gutenberg couldn't reload that bit and you will
  32. need to restart `gutenberg serve`.