2014-05-27 18:32:57 -04:00
|
|
|
---
|
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
|
|
|
|
prev: /extras/aliases
|
|
|
|
title: Hugo Builders
|
2014-11-25 03:07:18 -05:00
|
|
|
weight: 20
|
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
|
|
|
|
2015-01-17 02:45:53 -05:00
|
|
|
$ hugo new site /path/to/site
|
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.
|