2017-05-25 12:23:29 -04:00
|
|
|
# hugo
|
|
|
|
|
2019-10-09 12:49:37 -03:00
|
|
|
> Template-based static site generator. Uses modules, components, and themes.
|
2019-06-07 11:58:31 +01:00
|
|
|
> More information: <https://gohugo.io>.
|
2017-05-25 12:23:29 -04:00
|
|
|
|
2017-05-25 18:52:55 -04:00
|
|
|
- Create a new Hugo site:
|
2017-05-25 12:23:29 -04:00
|
|
|
|
|
|
|
`hugo new site {{path/to/site}}`
|
|
|
|
|
2023-09-10 15:21:33 +02:00
|
|
|
- Create a new Hugo theme (themes may also be downloaded from <https://themes.gohugo.io/>):
|
2017-05-25 12:23:29 -04:00
|
|
|
|
|
|
|
`hugo new theme {{theme_name}}`
|
|
|
|
|
|
|
|
- Create a new page:
|
|
|
|
|
2023-05-18 09:47:37 +05:30
|
|
|
`hugo new {{section_name}}/{{page_name}}`
|
2017-05-25 12:23:29 -04:00
|
|
|
|
2017-05-25 21:32:36 -04:00
|
|
|
- Build a site to the `./public/` directory:
|
2017-05-25 12:23:29 -04:00
|
|
|
|
|
|
|
`hugo`
|
|
|
|
|
2017-05-25 21:32:36 -04:00
|
|
|
- Build a site including pages that are marked as a "draft":
|
2017-05-25 12:23:29 -04:00
|
|
|
|
2017-05-25 18:52:55 -04:00
|
|
|
`hugo --buildDrafts`
|
2017-05-25 12:23:29 -04:00
|
|
|
|
2023-10-23 19:37:28 +01:00
|
|
|
- Build a site on your local IP:
|
|
|
|
|
|
|
|
`hugo server --bind {{local-ip}} --baseURL {{http://local-ip}}`
|
|
|
|
|
2017-05-25 21:32:36 -04:00
|
|
|
- Build a site to a given directory:
|
2017-05-25 12:23:29 -04:00
|
|
|
|
2017-05-25 18:52:55 -04:00
|
|
|
`hugo --destination {{path/to/destination}}`
|
2017-05-25 12:23:29 -04:00
|
|
|
|
2017-05-25 21:32:36 -04:00
|
|
|
- Build a site, start up a webserver to serve it, and automatically reload when pages are edited:
|
2017-05-25 12:23:29 -04:00
|
|
|
|
2017-05-25 18:52:55 -04:00
|
|
|
`hugo server`
|