17 KiB
Troubleshooting Guide
Common issues and solutions when working with the Hugo Saasify Theme. Find quick fixes for installation, build, styling, content, deployment, and performance problems.
Table of Contents
- Installation Issues
- Build Errors
- Styling Problems
- Content Issues
- Deployment Problems
- Performance Issues
- Browser Compatibility
- Getting Help
Installation Issues
Theme Not Found
Problem: Hugo can't find the theme
Error: unable to locate theme directory "chill-theme"
Solutions:
- Verify theme directory exists:
ls themes/chill-theme
- Check theme name in config:
# hugo.toml
theme = "chill-theme" # Must match directory name exactly
- If using Git submodule, initialize it:
git submodule init
git submodule update --recursive
- Check directory structure:
# Should show theme files
ls -la themes/chill-theme/layouts/
Hugo Extended Not Installed
Problem: Error about Hugo Extended being required
Error: this theme requires Hugo Extended
Solutions:
- Check your Hugo version:
hugo version
Expected output should include "extended":
hugo v0.120.0+extended darwin/amd64
-
Install Hugo Extended:
- Visit Hugo Releases
- Download version with "extended" in the name
- Install and verify
-
On macOS with Homebrew:
brew install hugo
Submodule Empty
Problem: Theme directory exists but is empty
Solutions:
- Update submodules:
git submodule update --init --recursive
- If still empty, remove and re-add:
git submodule deinit -f themes/chill-theme
rm -rf .git/modules/themes/chill-theme
git rm -f themes/chill-theme
git submodule add https://github.com/chaoming/chill-theme.git themes/chill-theme
npm Dependencies Failed
Problem: npm install fails
npm ERR! code ENOENT
Solutions:
- Check Node.js is installed:
node --version
npm --version
- Ensure config files are copied to site root:
cp themes/chill-theme/package.json .
cp themes/chill-theme/postcss.config.js .
cp themes/chill-theme/tailwind.config.copy.js ./tailwind.config.js
- Clear npm cache:
npm cache clean --force
- Delete and reinstall:
rm -rf node_modules package-lock.json
npm install
- Use different npm registry (if blocked):
npm config set registry https://registry.npmjs.org/
npm install
Build Errors
Tailwind CSS Not Processing
Problem: Site loads without styling
Solutions:
- Enable build stats in
hugo.toml:
[build]
writeStats = true
[build.buildStats]
enable = true
- Clear Hugo cache:
hugo --gc
- Verify Tailwind config exists:
ls themes/chill-theme/tailwind.config.js
- Rebuild from clean state:
rm -rf public resources
hugo server -D
Template Errors
Problem: Error in template execution
Error: error calling partial: template: partials/header.html...
Solutions:
-
Check the error message - it usually points to the specific line
-
Common causes:
- Missing closing tags
- Incorrect variable names
- Missing required parameters
- Syntax errors in shortcodes
-
Validate configuration:
hugo config
- Test with minimal config:
- Copy
exampleSite/hugo.toml - Gradually add your customizations
- Copy
Shortcode Errors
Problem: Shortcode fails to render
Error: failed to render shortcode "pricing-table-1"
Solutions:
-
Check JSON syntax (for shortcodes accepting JSON):
- Use double quotes, not single quotes
- No trailing commas
- Valid JSON structure
- Use JSON validator online
-
Verify shortcode exists:
ls themes/chill-theme/layouts/shortcodes/pricing-table-1.html
- Check shortcode syntax:
# Correct
{{< shortcode-name >}}
# Incorrect
{< shortcode-name >} # Missing one brace
{{<shortcode-name>}} # Missing spaces
Build Fails in CI/CD
Problem: Builds work locally but fail in CI
Solutions:
-
Match Hugo versions:
- Check local:
hugo version - Set in CI config:
HUGO_VERSION=0.120.0
- Check local:
-
Install theme dependencies:
# GitHub Actions example
- name: Install dependencies
run: |
cp themes/chill-theme/package.json .
cp themes/chill-theme/postcss.config.js .
cp themes/chill-theme/tailwind.config.copy.js ./tailwind.config.js
npm install
-
Check environment variables:
- Verify all required env vars are set
- Check for typos in variable names
-
Review build logs:
- Look for specific error messages
- Check file paths are correct
- Verify permissions
Styling Problems
Custom CSS Not Loading
Problem: Custom CSS changes don't appear
Solutions:
-
Clear browser cache:
- Hard refresh: Ctrl+Shift+R (Windows/Linux) or Cmd+Shift+R (Mac)
- Or use incognito/private mode
-
Verify CSS file path:
[params]
customCSS = ["css/custom.css"] # File must be in static/css/
- Check file exists:
ls static/css/custom.css
- Clear Hugo cache:
hugo --gc
rm -rf resources
hugo server -D
Tailwind Classes Not Working
Problem: Tailwind utility classes have no effect
Solutions:
- Check class is in content paths:
// tailwind.config.js
content: ["./layouts/**/*.html"]
- Avoid dynamic class names:
<!-- Don't do this -->
<div class="text-{{ .Color }}-600">
<!-- Do this instead -->
<div class="{{ if eq .Color "blue" }}text-blue-600{{ end }}">
- Rebuild site:
hugo --gc
hugo
- Check Tailwind version compatibility:
npm list tailwindcss
Colors Not Matching Design
Problem: Colors appear different than expected
Solutions:
- Check color values in
tailwind.config.js:
colors: {
primary: {
600: '#425ad6', // Your primary color
}
}
- Verify you're using correct shade:
<div class="bg-primary-600"> <!-- Not bg-primary -->
-
Check for color overrides in custom CSS
-
Test in different browsers to rule out rendering differences
Responsive Design Issues
Problem: Layout broken on mobile/tablet
Solutions:
-
Test with DevTools:
- Open Chrome DevTools (F12)
- Toggle device toolbar (Ctrl+Shift+M)
- Test various screen sizes
-
Check responsive classes:
<!-- Use responsive prefixes -->
<div class="text-sm md:text-base lg:text-lg">
- Verify viewport meta tag (should be in baseof.html):
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- Test breakpoints:
- sm: 640px
- md: 768px
- lg: 1024px
- xl: 1280px
Content Issues
Page Not Rendering
Problem: Page exists but shows 404
Solutions:
- Check front matter:
---
title: "My Page"
draft: false # Make sure this is false
---
- Verify file location:
ls content/my-page.md
-
Check URL structure:
content/about.md→/about/content/blog/post.md→/blog/post/
-
Restart server:
hugo server -D # -D shows drafts
Images Not Displaying
Problem: Images don't show on page
Solutions:
- Check file path:
# Correct - absolute from static/

# Incorrect - relative path

- Verify file exists:
ls static/images/photo.jpg
- Check file permissions:
chmod 644 static/images/photo.jpg
-
Test URL directly:
- Visit
http://localhost:1313/images/photo.jpg - Should display the image
- Visit
-
Check file extension matches exactly (case-sensitive on some systems)
Shortcode Shows as Text
Problem: Shortcode appears as plain text instead of rendering
Solutions:
- Check syntax:
# Correct
{{< shortcode >}}
# Incorrect
{{ < shortcode > }}
{< shortcode >}
- Verify shortcode exists:
ls themes/chill-theme/layouts/shortcodes/
- Check if content uses correct format:
- Markdown files: Use
{{< >}} - HTML files: Use
{{ .Inner }}
- Markdown files: Use
Taxonomy Pages Empty
Problem: Category or tag pages show no posts
Solutions:
- Enable taxonomies in
hugo.toml:
[taxonomies]
category = 'categories'
tag = 'tags'
- Check front matter:
categories: ["Technology"] # Use array, not string
tags: ["Hugo", "Tutorial"]
- Verify taxonomy matches config:
# If you have:
[taxonomies]
category = 'categories'
# Use in front matter:
categories: ["Tech"] # Not category:
Deployment Problems
Build Fails on Platform
Problem: Build works locally but fails on Netlify/Vercel/etc.
Solutions:
- Set Hugo version:
Netlify:
# netlify.toml
[build.environment]
HUGO_VERSION = "0.120.0"
Vercel:
// vercel.json
{
"build": {
"env": {
"HUGO_VERSION": "0.120.0"
}
}
}
- Install theme dependencies:
Add to build command:
cp themes/chill-theme/package.json . && cp themes/chill-theme/postcss.config.js . && cp themes/chill-theme/tailwind.config.copy.js ./tailwind.config.js && npm install && hugo --minify
- Check environment variables are set in platform UI
Assets Not Loading After Deploy
Problem: CSS/JS/images don't load on deployed site
Solutions:
- Verify baseURL in
hugo.toml:
baseURL = "https://yourdomain.com/" # Must match your domain
- Use absolute paths:
<!-- Correct -->
<img src="/images/logo.svg">
<!-- Incorrect -->
<img src="images/logo.svg">
-
Check CDN/cache:
- Clear CDN cache
- Wait for propagation
- Hard refresh browser
-
Verify build output:
# Check public/ directory
ls -la public/css/
ls -la public/images/
SSL Certificate Issues
Problem: HTTPS not working or certificate errors
Solutions:
-
Wait for provisioning (can take 24-48 hours)
-
Check DNS configuration:
- A record points to correct IP
- CNAME points to correct host
-
Force HTTPS in platform settings
-
Clear browser SSL cache
404 on Deployed Site
Problem: Pages work locally but 404 on deployed site
Solutions:
- Check baseURL includes trailing slash:
baseURL = "https://example.com/" # Note the /
-
Verify case sensitivity:
- URLs are case-sensitive on most servers
- Use lowercase for consistency
-
Check redirects (if you have them):
- Verify redirect rules are correct
- Check for infinite redirect loops
Performance Issues
Slow Build Times
Problem: Site takes too long to build
Solutions:
- Enable caching:
[caches]
[caches.images]
dir = ":resourceDir/_gen"
maxAge = "1440h"
-
Optimize images before adding:
- Compress images
- Reduce dimensions
- Use appropriate formats
-
Limit content during development:
hugo server -D --buildFuture=false --buildExpired=false
- Check for template loops:
- Review custom templates
- Look for inefficient queries
Site Loads Slowly
Problem: Pages take long time to load in browser
Solutions:
- Enable minification:
hugo --minify
-
Optimize images:
- Compress all images
- Use WebP format
- Implement lazy loading
-
Use CDN for static assets
-
Enable caching on server:
# Nginx example
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 1y;
}
- Run Lighthouse audit:
- Open Chrome DevTools
- Go to Lighthouse tab
- Run performance audit
- Follow recommendations
Large CSS File
Problem: Generated CSS is too large
Solutions:
- Verify PurgeCSS is working:
# Check file size
ls -lh public/css/*.css
- Ensure build stats enabled:
[build]
writeStats = true
- Check content paths in
tailwind.config.js:
content: ["./layouts/**/*.html"]
Browser Compatibility
Works in Chrome, Not Safari
Problem: Site works in Chrome but has issues in Safari
Solutions:
-
Check for unsupported CSS:
- Avoid bleeding-edge features
- Test CSS properties on Can I Use
-
Add vendor prefixes if needed:
-webkit-transition: all 0.3s;
transition: all 0.3s;
- Test in multiple browsers:
- Chrome
- Firefox
- Safari
- Edge
JavaScript Errors in IE11
Problem: Site broken in Internet Explorer
Note: IE11 is deprecated. Modern browsers only.
Solutions:
- Display upgrade message for old browsers
- Focus on modern browsers (Chrome, Firefox, Safari, Edge)
- IE11 usage is <1% globally - consider if support is needed
Getting Help
Before Asking for Help
- Check this guide for your issue
- Review documentation:
- Search existing issues on GitHub
- Try example site to isolate problem
Gathering Information
When reporting issues, include:
- Hugo version:
hugo version
- Operating system:
uname -a # Linux/Mac
# or
ver # Windows
-
Error messages (complete output)
-
Configuration (relevant parts of
hugo.toml) -
Steps to reproduce:
- What you did
- What you expected
- What actually happened
-
Minimal reproduction:
- Simplest case that shows the problem
- Remove unrelated code/config
Where to Get Help
-
Documentation: Check all docs in
/docsdirectory -
Example Site: Review working examples in
/exampleSite -
GitHub Issues:
- Search: Existing Issues
- Create: New Issue
-
Hugo Community:
-
Stack Overflow:
- Tag:
hugo,hugo-theme
- Tag:
Creating a Good Issue Report
Template:
## Description
Brief description of the problem
## Environment
- Hugo version: 0.120.0+extended
- OS: macOS 14.0
- Theme version: main branch
## Steps to Reproduce
1. Step one
2. Step two
3. Step three
## Expected Behavior
What should happen
## Actual Behavior
What actually happens
## Error Messages
Paste error messages here
## Configuration
```toml
Relevant parts of hugo.toml
Additional Context
Any other relevant information
## Common Error Messages
### "Page Not Found"
**Cause**: Content file doesn't exist or is draft
**Fix**:
- Check file exists
- Verify `draft: false`
- Restart server
### "Template Not Found"
**Cause**: Missing or misnamed template file
**Fix**:
- Check template file exists
- Verify layout name in front matter
- Check template lookup order
### "Failed to Process"
**Cause**: CSS/Asset processing error
**Fix**:
- Check PostCSS configuration
- Verify Hugo Extended installed
- Review asset file syntax
### "Submodule Not Found"
**Cause**: Git submodule not initialized
**Fix**:
```bash
git submodule update --init --recursive
Quick Fixes Checklist
When something isn't working:
- Restart Hugo server
- Clear browser cache (Ctrl+Shift+R)
- Clear Hugo cache (
hugo --gc) - Delete
public/andresources/directories - Verify Hugo version (
hugo version) - Check
hugo.tomlsyntax - Review error messages carefully
- Test with example site configuration
- Check file permissions
- Verify file paths are correct
Prevention Best Practices
Avoid issues before they happen:
- Use Version Control: Commit working states
- Test Locally: Before deploying
- Keep Updated: Update Hugo and dependencies
- Follow Documentation: Don't guess
- Start Simple: Add complexity gradually
- Backup Configuration: Save working configs
- Use Example Site: Reference working examples
- Read Error Messages: They usually tell you what's wrong
Related Documentation
- INSTALLATION.md - Installation guide
- CONFIGURATION.md - Configuration options
- DEPLOYMENT.md - Deployment guides
- Hugo Troubleshooting
Still Stuck?
If you've tried everything and still have issues:
- Create minimal reproduction - Simplest case showing problem
- Open GitHub issue with all relevant information
- Be patient - Maintainers are volunteers
- Be detailed - More info = faster resolution
- Follow up - Respond to questions
Remember: Most issues have been encountered before. Search first, then ask.