LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

hugo

fast static site generator written in Go

TLDR

Create new site
$ hugo new site [site-name]
copy
Build site
$ hugo
copy
Create new content
$ hugo new content [posts/my-post.md]
copy
Start development server
$ hugo server
copy
Build with drafts included
$ hugo --buildDrafts
copy
Build for production with minification
$ hugo --minify
copy
Build to a specific directory
$ hugo -d [/path/to/output]
copy

SYNOPSIS

hugo [command] [options]

DESCRIPTION

Hugo is a fast static site generator written in Go. It builds websites from Markdown content using templates and themes.Hugo is extremely fast, building thousands of pages in seconds. It supports themes, taxonomies, and shortcodes for complex sites.

PARAMETERS

new content

Create new content file.
new site
Create a new site scaffold.
server
Start built-in development server.
-b, --baseURL URL
Hostname and path to the root.
-D, --buildDrafts
Include content marked as draft.
-E, --buildExpired
Include expired content.
-F, --buildFuture
Include content with future publish dates.
-d, --destination DIR
Filesystem path to write files to.
--minify
Minify supported output formats (HTML, XML, etc.).
--gc
Run cleanup tasks after the build (remove unused cache files).
--cleanDestinationDir
Remove files from destination not found in static directories.
-t, --theme THEME
Theme to use.
--logLevel LEVEL
Log level (debug, info, warn, error).

INSTALL

sudo apt install hugo
copy
sudo dnf install hugo
copy
sudo pacman -S hugo
copy
sudo apk add hugo
copy
sudo zypper install hugo
copy
brew install hugo
copy
nix profile install nixpkgs#hugo
copy

CAVEATS

Go-template syntax learning curve. Theme compatibility varies. No dynamic content.

HISTORY

Hugo was created by Steve Francia in 2013 as a fast alternative to Jekyll, written in Go. Note: `hugo new` for creating content is deprecated; use `hugo new content` instead.

SEE ALSO

hugo-server(1), jekyll(1), hexo(1)

Copied to clipboard
Kai