Manual Guide
This guide provides context and resources for understanding how everything works. If you want to go beyond “copy and paste” and actually understand the tools, this is for you.
What is a Static Website?
Section titled “What is a Static Website?”A static website is made of pre-built HTML files that are served to visitors exactly as stored. Unlike dynamic websites (like Facebook or Twitter), they don’t generate pages on-the-fly from a database.
Static vs Dynamic
Section titled “Static vs Dynamic”| Static | Dynamic |
|---|---|
| Pre-built HTML files | Generated per request |
| Fast loading | Can be slower |
| Very secure | More attack vectors |
| Host anywhere | Needs server processing |
| Blogs, portfolios, docs | E-commerce, social media |
Static Site Generators
Section titled “Static Site Generators”Tools like Hugo take your content (written in Markdown) and templates, then generate a complete website. This handbook uses Hugo, but others include:
- Jekyll — Ruby-based, GitHub Pages native
- Astro — Modern, component-based (this site uses it!)
- Gatsby — React-based
- Eleventy — Simple, flexible
Learn more:
Command Line Basics
Section titled “Command Line Basics”The command line (terminal, shell) is a text-based way to interact with your computer. The scripts in this handbook use it to automate tasks.
Essential Commands
Section titled “Essential Commands”| Command | Description |
|---|---|
pwd | Print working directory (where you are) |
ls (Mac/Linux) / dir (Windows) | List files in current folder |
cd foldername | Change to a folder |
cd .. | Go up one folder |
mkdir foldername | Create a new folder |
Keyboard Shortcuts
Section titled “Keyboard Shortcuts”| Shortcut | Action |
|---|---|
| ↑ / ↓ | Navigate command history |
| Ctrl+A | Go to start of line |
| Ctrl+E | Go to end of line |
| Option+← / Option+→ | Move word by word (Mac) |
| Ctrl+← / Ctrl+→ | Move word by word (Windows) |
| Ctrl+R | Search command history |
| Tab | Auto-complete filenames |
Learn more:
Git Fundamentals
Section titled “Git Fundamentals”Git is a version control system — it tracks changes to your files over time. GitHub is a website that hosts Git repositories online.
Key Concepts
Section titled “Key Concepts”- Repository (repo): A folder tracked by Git
- Commit: A snapshot of your files at a specific point
- Push: Upload your commits to GitHub
- Pull: Download changes from GitHub
- Clone: Download a complete repository
Git vs GitHub Desktop
Section titled “Git vs GitHub Desktop”| Method | Best For |
|---|---|
| GitHub Desktop | Visual learners, simplicity |
| VS Code Source Control | Developers already using VS Code |
| Command line | Full control, automation |
Learn more:
- Git - The Simple Guide
- Oh Shit, Git!? — Fixing common mistakes
- Pro Git Book — Comprehensive (free)
VS Code for Local Development
Section titled “VS Code for Local Development”Visual Studio Code is a free code editor that’s excellent for working with Hugo sites locally.
Benefits
Section titled “Benefits”- Live preview of Markdown
- Integrated terminal
- Git interface built-in
- Extensions for Hugo and Markdown
Key Extensions
Section titled “Key Extensions”- Markdown All in One — Preview, shortcuts, TOC
- YAML — For front matter editing
Learn more:
Hugo Deep Dive
Section titled “Hugo Deep Dive”Directory Structure
Section titled “Directory Structure”your-site/├── archetypes/ # Templates for new content├── assets/ # Files processed by Hugo (SCSS, JS)├── content/ # Your website content├── data/ # Data files (JSON, YAML)├── layouts/ # HTML templates├── static/ # Files served directly (images, CSS)├── themes/ # Your theme└── hugo.toml # Site configurationConfiguration (hugo.toml)
Section titled “Configuration (hugo.toml)”baseURL = 'https://example.com'languageCode = 'en-us'title = 'My Site'theme = 'ananke'
[params] author = 'Your Name' description = 'Site description'Content Format (Front Matter)
Section titled “Content Format (Front Matter)”---title: "My Post"date: 2024-01-01T12:00:00Zdraft: false---
Your content here in **Markdown**.Learn more:
Web Fundamentals
Section titled “Web Fundamentals”Understanding basic web technologies helps you customize your site.
HTML (Structure)
Section titled “HTML (Structure)”HTML defines the structure of web pages.
<h1>This is a heading</h1><p>This is a paragraph with <a href="link.html">a link</a>.</p><img src="photo.jpg" alt="Description">CSS (Styling)
Section titled “CSS (Styling)”CSS controls how your site looks.
body { font-family: Arial, sans-serif; color: #333; max-width: 800px; margin: 0 auto;}JavaScript (Interactivity)
Section titled “JavaScript (Interactivity)”JavaScript adds dynamic behavior (optional for static sites).
console.log('Hello, world!');document.querySelector('h1').style.color = 'blue';Learn more:
- MDN Web Docs — Comprehensive web documentation
- freeCodeCamp — Free coding courses
- HTML.com — HTML guide
Pixi Package Manager
Section titled “Pixi Package Manager”Pixi is a package manager we use to install Git and Hugo. It’s like an app store for command-line tools.
Why Pixi?
Section titled “Why Pixi?”- Cross-platform (Mac, Linux, Windows)
- No admin rights needed
- Isolated environments
- Easy to update and remove
Common Commands
Section titled “Common Commands”# Install a package globallypixi global install hugo
# Update a packagepixi global upgrade hugo
# List installed packagespixi global list
# Remove a packagepixi global remove hugoLearn more:
Cloudflare Pages
Section titled “Cloudflare Pages”Cloudflare Pages hosts your static website for free and automatically deploys when you push changes to GitHub.
How It Works
Section titled “How It Works”- You push code to GitHub
- Cloudflare detects the change
- Cloudflare runs
hugoto build your site - The built site is deployed to Cloudflare’s global network
Custom Domains
Section titled “Custom Domains”You can use your own domain name:
- In Cloudflare Pages, go to Custom domains
- Click Set up a custom domain
- Enter your domain name
- Follow the DNS configuration steps
Learn more:
Recommended Learning Path
Section titled “Recommended Learning Path”- Get a site online first — Follow the Quickstart
- Understand Git — Learn the basics of version control
- Learn Markdown — Essential for writing content
- Explore Hugo — Understand themes and configuration
- Study HTML/CSS — For customization
External Resources
Section titled “External Resources”Documentation
Section titled “Documentation”Communities
Section titled “Communities”- Markdown Guide
- Can I Use — Browser compatibility
- Coolors — Color palette generator