🔗 What is Hugo?

Hugo is a static site generator. Unlike other systems which dynamically build a page every time a visitor requests one, Hugo does the building when you create your content.

Hugo is optimized for website viewing

🔗 Quickstart


hugo new site NAME

hugo new post/good-to-great.md

mkdir themes && cd themes && \
git clone https://github.com/path-to/your-theme.git

hugo server --theme=your-theme --buildDrafts

🔗 Make post public

hugo undraft content/post/good-to-great.md

🔗 Generate website

./hugo --theme=your-theme

The public folder can be deployed to a server

🔗 Directory layout

├── archetypes
├── config.json
├── content
│   └── post
│       └── good-to-great.md
├── data
├── layouts
├── public...
├── static
└── themes...

🔗 archetypes

hugo new adds a few configuration properties to the post like date and title, define your own configuration properties with archetypes

🔗 Config

See config.toml, YAML and JSON also supported

🔗 content

Website sections, i.e. blog, article, or tutorial

🔗 data

Configuration files, can be YAML, JSON or TOML

🔗 layouts

Specify how your content will be converted into the static website

🔗 static

Images, CSS, JavaScript or other static content

🔗 Creating a theme

hugo new theme your-theme

🔗 Content not showing in Google

See this, possibly because “It is thin. It needs more than a couple lines of original text” or “It doesn’t have enough reputation or links. A page may be buried too deep in your site to rank. Any page without external links and more than a few clicks from the home page is unlikely to get indexed.”