Installation Guide
This guide will walk you through installing the Sans theme for your Hugo site.
Prerequisites
Before installing the Sans theme, ensure your development environment meets the following requirements:
| Requirement | Minimum Version |
|---|---|
| Hugo Extended | 0.146.0+ |
| Git | 2.0+ |
| Node.js | 18.0+ |
| npm | 9.0+ |
Verify Hugo Installation
Confirm that Hugo is properly installed and meets the minimum version requirement:
| |
Expected output:
| |
Important: Ensure you have the Extended version of Hugo installed, as the theme requires Hugo Extended features for SCSS/Sass processing.
Verify Git Installation
| |
Verify Node.js and npm
| |
Installation Methods
Option A: Git Submodule (Recommended)
Using Git submodules is the recommended approach as it allows easy theme updates and maintains a clean separation between your content and the theme.
Step 1: Initialize Git Repository
If your site isn’t already a Git repository:
| |
Step 2: Add Theme as Submodule
| |
This creates a themes/sans directory containing the theme.
Step 3: Copy Required Files
Copy the following directories from the theme to your site root:
| |
Step 4: Configure Theme
Move hugo.toml from the config folder to your site root:
| |
Open hugo.toml and verify the theme name is set correctly:
| |
Step 5: Test Installation
| |
Visit http://localhost:1313 to see your site.
Option B: Manual Download
If you prefer not to use Git submodules, you can manually download the theme.
Step 1: Download Theme
- Visit the Sans theme repository
- Click Code → Download ZIP
- Extract the ZIP file
Step 2: Move Theme to Hugo Site
| |
Important: Ensure the theme folder is named exactly sans (not sans-theme-main or any other variation).
Step 3: Copy Required Files
Follow the same steps as Option A (Steps 3-6):
- Copy
content,assets, andconfigdirectories - Move
hugo.tomlto site root - Verify
theme = "sans"in configuration - Run
npm install - Test with
hugo server
Post-Installation Configuration
Directory Structure
After installation, your site structure should look like this:
| |
Update Theme Configuration
Edit hugo.toml or configuration files in the config/ directory to customize:
- Site title and description
- Author information
- Theme colors and appearance
- Social media links
- Menu structure
- Search functionality
Refer to the Configuration Guide for detailed options.
Updating the Theme
For Git Submodule Installation
| |
For Manual Installation
- Download the latest version from GitHub
- Replace the
themes/sansdirectory with the new version - Review the changelog for breaking changes
Next Steps
Now that you’ve installed the Sans theme, you can:
- Configure Your Site - Customize theme settings
- Enable Search - Set up Pagefind search functionality
- Deploy Your Site - Publish to hosting platforms