2017-05-25 17:23:29 +01:00
|
|
|
# hugo
|
|
|
|
|
2019-10-09 16:49:37 +01: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 17:23:29 +01:00
|
|
|
|
2017-05-25 23:52:55 +01:00
|
|
|
- Create a new Hugo site:
|
2017-05-25 17:23:29 +01:00
|
|
|
|
|
|
|
`hugo new site {{path/to/site}}`
|
|
|
|
|
2023-09-10 14:21:33 +01:00
|
|
|
- Create a new Hugo theme (themes may also be downloaded from <https://themes.gohugo.io/>):
|
2017-05-25 17:23:29 +01:00
|
|
|
|
|
|
|
`hugo new theme {{theme_name}}`
|
|
|
|
|
|
|
|
- Create a new page:
|
|
|
|
|
2023-05-18 05:17:37 +01:00
|
|
|
`hugo new {{section_name}}/{{page_name}}`
|
2017-05-25 17:23:29 +01:00
|
|
|
|
2017-05-26 02:32:36 +01:00
|
|
|
- Build a site to the `./public/` directory:
|
2017-05-25 17:23:29 +01:00
|
|
|
|
|
|
|
`hugo`
|
|
|
|
|
2017-05-26 02:32:36 +01:00
|
|
|
- Build a site including pages that are marked as a "draft":
|
2017-05-25 17:23:29 +01:00
|
|
|
|
2017-05-25 23:52:55 +01:00
|
|
|
`hugo --buildDrafts`
|
2017-05-25 17:23:29 +01: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-26 02:32:36 +01:00
|
|
|
- Build a site to a given directory:
|
2017-05-25 17:23:29 +01:00
|
|
|
|
2017-05-25 23:52:55 +01:00
|
|
|
`hugo --destination {{path/to/destination}}`
|
2017-05-25 17:23:29 +01:00
|
|
|
|
2017-05-26 02:32:36 +01:00
|
|
|
- Build a site, start up a webserver to serve it, and automatically reload when pages are edited:
|
2017-05-25 17:23:29 +01:00
|
|
|
|
2017-05-25 23:52:55 +01:00
|
|
|
`hugo server`
|