tldr/pages/common/hugo.md

37 lines
814 B
Markdown
Raw Normal View History

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