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}}`
|
|
|
|
|
2017-05-26 02:32:36 +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:
|
|
|
|
|
2022-12-06 06:47:56 +00:00
|
|
|
`hugo new {{section_name}}/{{path/to/file}}`
|
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
|
|
|
|
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`
|