hugo Documentation

The world’s fastest framework for building websites.

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy hugo on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name hugo -p 1313:1313 --restart always gohugoio/hugo:latest

File: README.md

A fast and flexible static site generator built with love by bep, spf13, and friends in Go.



Website | Installation | Documentation | Support | Contributing | Mastodon

Overview

Hugo is a static site generator written in Go, optimized for speed and designed for flexibility. With its advanced templating system and fast asset pipelines, Hugo renders a complete site in seconds, often less.

Due to its flexible framework, multilingual support, and powerful taxonomy system, Hugo is widely used to create:

  • Corporate, government, nonprofit, education, news, event, and project sites
  • Documentation sites
  • Image portfolios
  • Landing pages
  • Business, professional, and personal blogs
  • Resumes and CVs

Use Hugo's embedded web server during development to instantly see changes to content, structure, behavior, and presentation. Then deploy the site to your host, or push changes to your Git provider for automated builds and deployment.

Hugo's fast asset pipelines include:

  • CSS Processing – Bundle, transform, minify, create source maps, perform SRI hashing, and integrate with PostCSS.
  • Image processing – Convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract metadata
  • JavaScript bundling – Transpile TypeScript and JSX to JavaScript, bundle, tree shake, minify, create source maps, and perform SRI hashing.
  • Sass processing – Transpile Sass to CSS, bundle, tree shake, minify, create source maps, perform SRI hashing, and integrate with PostCSS
  • Tailwind CSS processing – Compile Tailwind CSS utility classes into standard CSS, bundle, tree shake, optimize, minify, perform SRI hashing, and integrate with PostCSS

And with Hugo Modules, you can share content, assets, data, translations, themes, templates, and configuration with other projects via public or private Git repositories.

See the features section of the documentation for a comprehensive summary of Hugo's capabilities.

Sponsors

 


   

Editions

Hugo is available in several editions. Use the standard edition unless you need additional features.

Feature standard deploy extended extended/deploy
Core features :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Direct cloud deployment (1) :x: :heavy_check_mark: :x: :heavy_check_mark:
LibSass support (2) :x: :x: :heavy_check_mark: :heavy_check_mark:

(1) Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container. See details.

(2) Transpile Sass to CSS via embedded LibSass. Note that embedded LibSass was deprecated in v0.153.0 and will be removed in a future release. Use the Dart Sass transpiler instead, which is compatible with any edition.

Installation

Install Hugo from a prebuilt binary, package manager, or package repository. Please see the installation instructions for your operating system:

Build from source

To build Hugo from source you must install:

  1. Git
  2. Go version 1.26.0 or later

Standard edition

To build and install the standard edition:

sh
CGO_ENABLED=0 go install github.com/gohugoio/hugo@latest

Deploy edition

To build and install the deploy edition:

sh
CGO_ENABLED=0 go install -tags withdeploy github.com/gohugoio/hugo@latest

Extended edition

To build and install the extended edition, first install a C compiler such as GCC or Clang and then run the following command.

sh
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest

Extended/deploy edition

To build and install the extended/deploy edition, first install a C compiler such as GCC or Clang and then run the following command.

sh
CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest

Documentation

Hugo's documentation includes installation instructions, a quick start guide, conceptual explanations, reference information, and examples.

Please submit documentation issues and pull requests to the documentation repository.

Support

Please do not use the issue queue for questions or troubleshooting. Unless you are certain that your issue is a software defect, use the forum.

Hugo's forum is an active community of users and developers who answer questions, share knowledge, and provide examples. A quick search of over 20,000 topics will often answer your question. Please be sure to read about requesting help before asking your first question.

Contributing

You can contribute to the Hugo project by:

Please submit documentation issues and pull requests to the documentation repository.

If you have an idea for an enhancement or new feature, create a new topic on the forum in the "Feature" category. This will help you to:

  • Determine if the capability already exists
  • Measure interest
  • Refine the concept

If there is sufficient interest, create a proposal. Do not submit a pull request until the project lead accepts the proposal.

For a complete guide to contributing to Hugo, see the Contribution Guide.

License

For the Hugo source code, see LICENSE.

We also bundle some libraries in binary/WASM form:

Dependencies

Hugo stands on the shoulders of great open source libraries. Run hugo env --logLevel info to display a list of dependencies.

See current dependencies

text
/* Detailed source-code truncated for AI context efficiency. */

File: create/skeletons/theme/content/posts/post-3/index.md

+++
title = 'Post 3'
date = 2023-03-15T11:00:00-07:00
draft = false
tags = ['red','green','blue']
+++

Occaecat aliqua consequat laborum ut ex aute aliqua culpa quis irure esse magna dolore quis. Proident fugiat labore eu laboris officia Lorem enim. Ipsum occaecat cillum ut tempor id sint aliqua incididunt nisi incididunt reprehenderit. Voluptate ad minim sint est aute aliquip esse occaecat tempor officia qui sunt. Aute ex ipsum id ut in est velit est laborum incididunt. Aliqua qui id do esse sunt eiusmod id deserunt eu nostrud aute sit ipsum. Deserunt esse cillum Lorem non magna adipisicing mollit amet consequat.

Sit excepteur do velit veniam mollit in nostrud laboris incididunt ea. Amet eu cillum ut reprehenderit culpa aliquip labore laborum amet sit sit duis. Laborum id proident nostrud dolore laborum reprehenderit quis mollit nulla amet veniam officia id id. Aliquip in deserunt qui magna duis qui pariatur officia sunt deserunt.


File: create/skeletons/theme/content/posts/_index.md

+++
title = 'Posts'
date = 2023-01-01T08:30:00-07:00
draft = false
+++

Tempor est exercitation ad qui pariatur quis adipisicing aliquip nisi ea consequat ipsum occaecat. Nostrud consequat ullamco laboris fugiat esse esse adipisicing velit laborum ipsum incididunt ut enim. Dolor pariatur nulla quis fugiat dolore excepteur. Aliquip ad quis aliqua enim do consequat.


File: create/skeletons/theme/content/posts/post-1.md

+++
title = 'Post 1'
date = 2023-01-15T09:00:00-07:00
draft = false
tags = ['red']
+++

Tempor proident minim aliquip reprehenderit dolor et ad anim Lorem duis sint eiusmod. Labore ut ea duis dolor. Incididunt consectetur proident qui occaecat incididunt do nisi Lorem. Tempor do laborum elit laboris excepteur eiusmod do. Eiusmod nisi excepteur ut amet pariatur adipisicing Lorem.

Occaecat nulla excepteur dolore excepteur duis eiusmod ullamco officia anim in voluptate ea occaecat officia. Cillum sint esse velit ea officia minim fugiat. Elit ea esse id aliquip pariatur cupidatat id duis minim incididunt ea ea. Anim ut duis sunt nisi. Culpa cillum sit voluptate voluptate eiusmod dolor. Enim nisi Lorem ipsum irure est excepteur voluptate eu in enim nisi. Nostrud ipsum Lorem anim sint labore consequat do.


File: create/skeletons/theme/content/posts/post-2.md

+++
title = 'Post 2'
date = 2023-02-15T10:00:00-07:00
draft = false
tags = ['red','green']
+++

Anim eiusmod irure incididunt sint cupidatat. Incididunt irure irure irure nisi ipsum do ut quis fugiat consectetur proident cupidatat incididunt cillum. Dolore voluptate occaecat qui mollit laborum ullamco et. Ipsum laboris officia anim laboris culpa eiusmod ex magna ex cupidatat anim ipsum aute. Mollit aliquip occaecat qui sunt velit ut cupidatat reprehenderit enim sunt laborum. Velit veniam in officia nulla adipisicing ut duis officia.

Exercitation voluptate irure in irure tempor mollit Lorem nostrud ad officia. Velit id fugiat occaecat do tempor. Sit officia Lorem aliquip eu deserunt consectetur. Aute proident deserunt in nulla aliquip dolore ipsum Lorem ut cupidatat consectetur sit sint laborum. Esse cupidatat sit sint sunt tempor exercitation deserunt. Labore dolor duis laborum est do nisi ut veniam dolor et nostrud nostrud.


File: create/skeletons/theme/content/_index.md

+++
title = 'Home'
date = 2023-01-01T08:00:00-07:00
draft = false
+++

Laborum voluptate pariatur ex culpa magna nostrud est incididunt fugiat
pariatur do dolor ipsum enim. Consequat tempor do dolor eu. Non id id anim anim
excepteur excepteur pariatur nostrud qui irure ullamco.


File: docs/archetypes/default.md


title: {{ replace .File.ContentBaseName "-" " " | strings.FirstUpper }} categories: [] keywords: []


File: docs/archetypes/functions.md


title: {{ replace .File.ContentBaseName "-" " " | title }}
categories: []
keywords: []
params:
functions_and_methods:
aliases: []
returnType:
signatures: []



File: docs/archetypes/glossary.md


title: {{ replace .File.ContentBaseName "-" " " }} params: reference: