2014-05-27 18:32:57 -04:00
|
|
|
---
|
2016-01-06 17:45:19 -05:00
|
|
|
lastmod: 2015-12-24
|
2014-05-29 18:42:05 -04:00
|
|
|
date: 2014-05-26
|
|
|
|
linktitle: Builders
|
2014-05-27 18:32:57 -04:00
|
|
|
menu:
|
|
|
|
main:
|
2014-05-29 18:42:05 -04:00
|
|
|
parent: extras
|
|
|
|
next: /extras/comments
|
2016-09-18 13:10:11 -04:00
|
|
|
prev: /extras/analytics
|
2014-05-29 18:42:05 -04:00
|
|
|
title: Hugo Builders
|
2014-05-27 18:32:57 -04:00
|
|
|
---
|
|
|
|
|
|
|
|
Hugo provides the functionality to quickly get a site, theme or page
|
|
|
|
started.
|
|
|
|
|
|
|
|
|
|
|
|
## New Site
|
|
|
|
|
2014-08-31 07:08:36 -04:00
|
|
|
Want to get a site built quickly?
|
2014-05-27 18:32:57 -04:00
|
|
|
|
2016-01-09 13:57:14 -05:00
|
|
|
{{< nohighlight >}}$ hugo new site <i>path/to/site</i>
|
|
|
|
{{< /nohighlight >}}
|
2014-05-27 18:32:57 -04:00
|
|
|
|
|
|
|
Hugo will create all the needed directories and files to get started
|
|
|
|
quickly.
|
|
|
|
|
|
|
|
Hugo will only touch the files and create the directories (in the right
|
2015-01-27 21:17:09 -05:00
|
|
|
places), [configuration](/overview/configuration/) and content are up to
|
2014-05-27 18:32:57 -04:00
|
|
|
you... but luckily we have builders for content (see below).
|
|
|
|
|
|
|
|
## New Theme
|
|
|
|
|
|
|
|
Want to design a new theme?
|
|
|
|
|
2015-01-17 02:45:53 -05:00
|
|
|
$ hugo new theme THEME_NAME
|
2014-05-27 18:32:57 -04:00
|
|
|
|
|
|
|
Run from your working directory, this will create a new theme with all
|
|
|
|
the needed files in your themes directory. Hugo will provide you with a
|
|
|
|
license and theme.toml file with most of the work done for you.
|
|
|
|
|
2015-01-27 21:17:09 -05:00
|
|
|
Follow the [Theme Creation Guide](/themes/creation/) once the builder is
|
2014-05-27 18:32:57 -04:00
|
|
|
done.
|
|
|
|
|
|
|
|
## New Content
|
|
|
|
|
|
|
|
You will use this builder the most of all. Every time you want to create
|
|
|
|
a new piece of content, the content builder will get you started right.
|
|
|
|
|
2015-01-27 21:17:09 -05:00
|
|
|
Leveraging [content archetypes](/content/archetypes/) the content builder
|
2014-05-27 18:32:57 -04:00
|
|
|
will not only insert the current date and appropriate metadata, but it
|
|
|
|
will pre-populate values based on the content type.
|
|
|
|
|
2015-01-17 02:45:53 -05:00
|
|
|
$ hugo new relative/path/to/content
|
2014-05-27 18:32:57 -04:00
|
|
|
|
|
|
|
This assumes it is being run from your working directory and the content
|
2015-12-24 17:26:04 -05:00
|
|
|
path starts from your content directory. Now, Hugo watches your content directory by default and rebuilds your entire website if any change occurs.
|