How I Built This Website: Hugo + Hextra Setup Guide
đ TLDR: Hugo + Hextra Website Setup
- đī¸ Tech Stack: Hugo static site generator + Hextra documentation theme
- ⥠Quick Setup: Install Hugo â Create site â Add Hextra theme â Configure â Deploy
- đ Content Structure: Organized by categories (Read, Use, Listen, Enjoy, See, About)
- đ Deployment: Netlify, Vercel, or Cloudflare Pages
- đ Features: Search, responsive design, dark mode, fast performance
Key Resources:
- đ Hugo Documentation - Official Hugo docs
- đ¨ Hextra Documentation - Theme docs
- đģ Hugo Quick Start - Get started fast
đ Introduction
This website is built using Hugo, a fast and flexible static site generator written in Go, combined with the Hextra theme, a modern and feature-rich theme designed for documentation sites. In this article, I’ll walk through the process of setting up a similar site and organizing content.
đ Hugo and Hextra Documentation
đ Hugo Documentation
Hugo’s official documentation is comprehensive and well-structured. Key areas to focus on include:
- đ Quick Start Guide: Gets you up and running in minutes
- đ Content Management: Understanding how Hugo handles markdown files
- âī¸ Configuration: The
hugo.tomlfile structure and options - đ¨ Themes: How to install and customize themes
- đ Deployment: Various options for hosting your site
đ Hextra Theme Documentation
The Hextra documentation is essential for understanding the theme’s capabilities:
- đ Getting Started: Installation and basic setup
- âī¸ Configuration: Theme-specific parameters and customization
- đ Content Types: Different page types and layouts
- đ§Š Shortcodes: Pre-built components for rich content
- đ¨ Styling: CSS customization and dark mode support
đ ī¸ Setting Up the Website
đ Prerequisites
Before starting, ensure you have:
- đš Go installed on your system
- đĻ Git for version control
- âī¸ A text editor (VS Code recommended)
âī¸ Installation Steps
đĨ Install Hugo (if not already installed):
# Using package manager (recommended) brew install hugo # macOS # or sudo apt install hugo # Ubuntu/Debianđī¸ Create a new Hugo site:
hugo new site my-website cd my-websiteđ¨ Add the Hextra theme:
git init git submodule add https://github.com/imfing/hextra.git themes/hextraâī¸ Configure the site by editing
hugo.toml:baseURL = "https://yourdomain.com/" languageCode = "en-us" title = "Your Site Title" theme = "hextra" [params] enableSearch = true enableSidebar = trueđ Create your first pages:
hugo new _index.md # Homepage hugo new about/_index.md # About sectionđ Start the development server:
hugo serverVisit
http://localhost:1313to see your site.
đ Content Organization by Category
The key to a maintainable knowledge site is thoughtful content organization. Here’s how I structured this site:
đˇī¸ Main Categories
The site uses six main content categories, each with its own folder:
- đ Read (
/content/read/): Books, articles, and written content - đ ī¸ Use (
/content/use/): Tools, projects, and tutorials - đ§ Listen (
/content/listen/): Music and podcasts - đ Enjoy (
/content/enjoy/): Cooking, games, and travel - đī¸ See (
/content/see/): Art, movies, and videos - âšī¸ About (
/content/about/): Personal information and site details
đī¸ Content Structure
Each category follows a consistent structure:
content/
âââ _index.md # Category listing page
âââ subcategory1/
â âââ _index.md # Subcategory listing
â âââ item1.md # Individual content item
âââ subcategory2/
âââ _index.md
âââ item2.mdđ Front Matter
Every content file includes essential metadata:
(---
title: "Content Title"
description: "Brief description"
date: 2025-10-09
draft: false
breadcrumbs: false
---)đ§ Navigation Menu
The main navigation is configured in hugo.toml:
[menu]
[[menu.main]]
name = "Read"
url = "/read/"
weight = 3
[[menu.main]]
name = "Use"
url = "/use/"
weight = 4
# ... other menu items⥠Advanced Features
đ Search Functionality
Hugo’s built-in search is enhanced by Hextra’s search interface. Enable it in your configuration:
[params]
enableSearch = trueđ Analytics Integration
Add web analytics using the built-in Analytics integration
đą Responsive Design
Hextra is mobile-first and responsive out of the box. The theme includes:
- đ Dark/light mode toggle
- đą Mobile-friendly navigation
- đ Optimized typography
- ⥠Fast loading performance
đ Deployment
For production deployment, I recommend:
đī¸ Build the site:
hugo --minifyđ Deploy to your hosting platform:
- âī¸ Netlify: Drag and drop the
public/folder - ⲠVercel: Connect your Git repository
- âī¸ Cloudflare Pages: Push to Git and configure deployment
- âī¸ Netlify: Drag and drop the
đĄ Tips for Success
- đ¯ Start simple: Begin with basic pages and add complexity gradually
- đ Use archetypes: Create templates for consistent front matter
- đ§Š Leverage shortcodes: Use Hextra’s built-in components for rich content
- đž Regular backups: Keep your content safe with version control
- đ Performance monitoring: Use tools like Lighthouse to optimize loading times
This setup provides a solid foundation for a knowledge management site that’s both powerful and maintainable. The combination of Hugo’s speed and Hextra’s features creates an excellent platform for sharing and organizing information.