Hugo โ Run and Build
Requirements:
- Install Hugo (Extended) and Git
- Optional: Go (for some themes/tools)
Install Hugo:
Windows (Chocolatey):
choco install hugo-extended -y
macOS (Homebrew):
brew install hugo
Verify:
hugo version
Create a new site:
hugo new site my-hugo-sitecd my-hugo-sitegit init
Add a theme (example: PaperMod):
git submodule add https://github.com/adityatelange/hugo-PaperMod themes/PaperModecho 'theme = "PaperMod"' >> hugo.toml
Add your first page:
hugo new posts/hello-world.md
Run locally (dev server with live reload):
hugo server -D
Visit http://localhost:1313
Build static site (output to public/
):
hugo
Deploy public/
to your static host (e.g., Netlify, GitHub Pages, S3).