Learn how to work effectively with Hugo static site generator.
Installation
Hugo can be installed on various platforms:
- macOS:
brew install hugo
- Linux: Download from releases or use package manager
- Windows: Use Chocolatey or download binary
Basic Commands
Create a new site
hugo new site mysite
Add a theme
git submodule add https://github.com/panr/hugo-theme-terminal.git themes/terminal
Create content
hugo new posts/my-post.md
Start development server
hugo server -D
Directory Structure
.
├── archetypes/
├── content/
├── data/
├── layouts/
├── public/
├── static/
├── themes/
└── hugo.toml
Tips and Tricks
- Use
hugo server --buildDrafts
to see draft posts - Add
--disableFastRender
for complete rebuilds - Use shortcodes for reusable content
- Customize themes by overriding templates in layouts/
Happy blogging!