2014-02-20 19:03:37 -05:00
---
2016-08-13 10:44:20 -04:00
lastmod: 2016-08-14
2014-05-29 18:42:05 -04:00
date: 2013-07-01
linktitle: Introduction
2014-04-23 03:00:11 -04:00
menu:
main:
2014-05-29 18:42:05 -04:00
parent: getting started
next: /overview/quickstart
title: Introduction to Hugo
weight: 5
2014-02-20 19:03:37 -05:00
---
## What is Hugo?
2014-08-31 07:08:36 -04:00
Hugo is a general-purpose website framework. Technically speaking, Hugo is
2015-12-09 10:56:49 -05:00
a static site generator. Unlike other systems which dynamically build a page
2014-02-20 19:03:37 -05:00
every time a visitor requests one, Hugo does the building when you create
2015-02-16 16:53:12 -05:00
your content. Since websites are viewed far more often than they are
2014-02-28 11:41:47 -05:00
edited, Hugo is optimized for website viewing while providing a great
2014-08-31 07:08:36 -04:00
writing experience.
2014-02-20 19:03:37 -05:00
2014-08-31 07:08:36 -04:00
Sites built with Hugo are extremely fast and very secure. Hugo sites can
2015-01-13 22:48:44 -05:00
be hosted anywhere, including [Heroku][], [GoDaddy][], [DreamHost][],
2017-01-26 13:42:56 -05:00
[GitHub Pages][], [Netlify][], [Surge][], [Aerobatic][], [Firebase Hosting][],
2016-10-09 19:02:56 -04:00
[Google Cloud Storage][], [Amazon S3][] and [CloudFront][], and work well
with CDNs. Hugo sites run without dependencies on expensive runtimes
like Ruby, Python or PHP and without dependencies on any databases.
2015-01-13 22:48:44 -05:00
[Heroku]: https://www.heroku.com/
[GoDaddy]: https://www.godaddy.com/
[DreamHost]: http://www.dreamhost.com/
2016-10-10 07:28:59 -04:00
[GitLab]: https://about.gitlab.com
2015-01-25 16:53:21 -05:00
[GitHub Pages]: https://pages.github.com/
2016-03-12 02:25:26 -05:00
[Aerobatic]: https://www.aerobatic.com/
2016-10-09 19:02:56 -04:00
[Firebase Hosting]: https://firebase.google.com/docs/hosting/
2015-04-07 23:02:20 -04:00
[Google Cloud Storage]: http://cloud.google.com/storage/
2015-01-13 22:48:44 -05:00
[Amazon S3]: http://aws.amazon.com/s3/
[CloudFront]: http://aws.amazon.com/cloudfront/ "Amazon CloudFront"
2016-03-20 08:15:54 -04:00
[Surge]: https://surge.sh
2017-01-26 13:42:56 -05:00
[Netlify]: https://www.netlify.com
2014-02-20 19:03:37 -05:00
We think of Hugo as the ideal website creation tool. With nearly instant
2014-08-31 07:08:36 -04:00
build times and the ability to rebuild whenever a change is made, Hugo
2014-02-20 19:03:37 -05:00
provides a very fast feedback loop. This is essential when you are
2014-08-31 07:08:36 -04:00
designing websites, but also very useful when creating content.
2014-02-20 19:03:37 -05:00
2015-04-04 04:13:06 -04:00
## What makes Hugo different?
Web site generators render content into HTML files. Most are "dynamic
site generators." That means the HTTP
server (which is the program running on your website that the user's
browser talks to) runs the generator to create a new HTML file
each and every time a user wants to view a page.
Creating the page dynamically means that the computer hosting
the HTTP server has to have enough memory and CPU to effectively run
the generator around the clock. If not, then the user has to wait
in a queue for the page to be generated.
Nobody wants users to wait longer than needed, so the dynamic site
generators programmed their systems to cache the HTML files. When
a file is cached, a copy of it is temporarily stored on the computer.
It is much faster for the HTTP server to send that copy the next time
the page is requested than it is to generate it from scratch.
2015-05-29 11:14:37 -04:00
Hugo takes caching a step further. All HTML files are rendered on your
2015-04-04 04:13:06 -04:00
computer. You can review the files before you copy them to the computer
hosting the HTTP server. Since the HTML files aren't generated dynamically,
we say that Hugo is a "static site generator."
Not running a web site generator on your HTTP server has many benefits.
The most noticeable is performance - HTTP servers are very good at
sending files. So good that you can effectively serve the same number
of pages with a fraction of the memory and CPU needed for a dynamic site.
Hugo has two components to help you build and test your web site. The
one that you'll probably use most often is the built-in HTTP server.
When you run `hugo server` , Hugo renders all of your content into
2016-02-20 02:16:14 -05:00
HTML files and then runs an HTTP server on your computer so that you
2015-04-04 04:13:06 -04:00
can see what the pages look like.
The second component is used when you're ready to publish your web
site to the computer running your website. Running Hugo without any
2016-10-24 14:56:00 -04:00
actions will rebuild your entire web site using the `baseURL` setting
2015-04-04 04:13:06 -04:00
from your site's configuration file. That's required to have your page
links work properly with most hosting companies.
2015-01-27 17:14:19 -05:00
## How fast is Hugo?
{{% youtube CdiDYZ51a2o %}}
2014-02-20 19:03:37 -05:00
## What does Hugo do?
2015-08-01 17:50:39 -04:00
In technical terms, Hugo takes a source directory of files and
2014-08-31 07:08:36 -04:00
templates and uses these as input to create a complete website.
2014-02-20 19:03:37 -05:00
Hugo boasts the following features:
2014-05-27 18:32:57 -04:00
### General
2016-02-20 02:16:14 -05:00
* Extremely fast build times (~1 ms per page)
2017-03-13 15:29:23 -04:00
* Completely cross platform: Runs on < i class = "fa fa-apple" ></ i > macOS, < i class = "fa fa-linux" ></ i > Linux, < i class = "fa fa-windows" ></ i > Windows, and more!
2015-01-27 21:17:09 -05:00
* Easy [installation ](/overview/installing/ )
* Render changes [on the fly ](/overview/usage/ ) with [LiveReload ](/extras/livereload/ ) as you develop
2014-05-27 18:32:57 -04:00
* Complete theme support
2014-02-20 19:03:37 -05:00
* Host your site anywhere
2014-05-27 18:32:57 -04:00
### Organization
2015-01-27 21:17:09 -05:00
* Straightforward [organization ](/content/organization/ )
* Support for [website sections ](/content/sections/ )
* Completely customizable [URLs ](/extras/urls/ )
* Support for configurable [taxonomies ](/taxonomies/overview/ ) which includes categories and tags. Create your own custom organization of content
* Ability to [sort content ](/content/ordering/ ) as you desire
* Automatic [table of contents ](/extras/toc/ ) generation
2014-05-27 18:32:57 -04:00
* Dynamic menu creation
2015-01-27 21:17:09 -05:00
* [Pretty URLs ](/extras/urls/ ) support
* [Permalink ](/extras/permalinks/ ) pattern support
* [Aliases ](/extras/aliases/ ) (redirects)
2014-05-27 18:32:57 -04:00
### Content
2015-08-01 17:50:39 -04:00
* Native support for content written in [Markdown ](/content/example/ )
* Support for other languages through _external helpers_ , see [supported formats ](/content/supported-formats )
2015-01-27 21:17:09 -05:00
* Support for TOML, YAML and JSON metadata in [frontmatter ](/content/front-matter/ )
* Completely [customizable homepage ](/layout/homepage/ )
* Support for multiple [content types ](/content/types/ )
* Automatic and user defined [summaries ](/content/summaries/ )
* [Shortcodes ](/extras/shortcodes/ ) to enable rich content inside of Markdown
* ["Minutes to Read" ](/layout/variables/ ) functionality
* ["Wordcount" ](/layout/variables/ ) functionality
2014-02-20 19:03:37 -05:00
2014-05-27 18:32:57 -04:00
### Additional Features
2014-12-27 02:50:08 -05:00
* Integrated [Disqus ](https://disqus.com/ ) comment support
2015-10-19 07:31:03 -04:00
* Integrated [Google Analytics ](https://google-analytics.com/ ) support
2015-01-27 21:17:09 -05:00
* Automatic [RSS ](/layout/rss/ ) creation
2016-10-15 07:18:26 -04:00
* Support for [Go ](http://golang.org/pkg/html/template/ ), [Amber ](https://github.com/eknkc/amber ) and [Ace ](https://github.com/yosssi/ace ) HTML templates
2015-01-27 21:17:09 -05:00
* Syntax [highlighting ](/extras/highlighting/ ) powered by [Pygments ](http://pygments.org/ )
2014-05-27 18:32:57 -04:00
2015-01-27 21:17:09 -05:00
See what's coming next in the [roadmap ](/meta/roadmap/ ).
2014-02-20 19:05:09 -05:00
2014-02-20 19:03:37 -05:00
## Who should use Hugo?
Hugo is for people that prefer writing in a text editor over
2014-05-27 18:32:57 -04:00
a browser.
2014-02-20 19:03:37 -05:00
Hugo is for people who want to hand code their own website without
worrying about setting up complicated runtimes, dependencies and
2014-08-31 07:08:36 -04:00
databases.
2014-02-20 19:03:37 -05:00
Hugo is for people building a blog, company site, portfolio, tumblog,
documentation, single page site or a site with thousands of
2014-08-31 07:08:36 -04:00
pages.
2014-02-20 19:03:37 -05:00
## Why did you write Hugo?
2014-09-03 00:12:26 -04:00
I wrote Hugo ultimately for a few reasons. First, I was disappointed with
2016-08-13 10:44:20 -04:00
WordPress, my then website solution. With it, I couldn't create
content as efficiently as I wanted to.
It rendered slowly. It required me to be online to write
posts: plus its constant security updates and the horror stories of people's
hacked blogs! I hated how content for it was written only in HTML, instead of the much
simpler Markdown. Overall, I felt like WordPress got in my way
much more than it helped me. It kept
2014-09-03 00:12:26 -04:00
me from writing great content.
2014-02-20 19:03:37 -05:00
2016-08-13 10:44:20 -04:00
I looked at the existing static site generators
like [Jekyll][], [Middleman][] and [Nanoc][].
All had complicated installation dependencies and took far longer to render
my blog with its hundreds of posts than I felt was acceptable. I wanted
a framework to be able to give me rapid feedback while making changes to the
templates, and the 5+-minute render times were just too slow. In general,
they were also very blog minded and didn't have the ability to provide
other content types and flexible URLs.
2014-02-20 19:03:37 -05:00
2015-01-13 22:48:44 -05:00
[Jekyll]: http://jekyllrb.com/
[Middleman]: https://middlemanapp.com/
2016-08-13 10:44:20 -04:00
[Nanoc]: http://nanoc.ws/
2015-01-13 22:48:44 -05:00
2016-08-13 10:44:20 -04:00
I wanted to develop a fast and full-featured website framework without any
dependencies. The [Go language][] seemed to have all the features I needed
2014-02-20 19:03:37 -05:00
in a language. I began developing Hugo in Go and fell in love with the
2016-08-13 10:44:20 -04:00
language. I hope you will enjoy using Hugo (and contributing to it) as much
2014-02-20 19:03:37 -05:00
as I have writing it.
2014-02-20 19:05:09 -05:00
2016-08-13 10:44:20 -04:00
— Steve Francia (@spf13)
2015-01-13 22:48:44 -05:00
[Go language]: http://golang.org/ "The Go Programming Language"
2014-02-20 19:05:09 -05:00
## Next Steps
2015-01-27 21:17:09 -05:00
* [Install Hugo ](/overview/installing/ )
* [Quick start ](/overview/quickstart/ )
* [Join the Mailing List ](/community/mailing-list/ )
* [Star us on GitHub ](https://github.com/spf13/hugo )
* [Discussion Forum ](http://discuss.gohugo.io/ )