By the end of today you can
- Start and stop a local Hugo preview
- Find and edit the file that holds the home-page introduction
- Explain the roles of the content file, the layout, and the browser preview
- Recover from a small mistake and keep a working copy
No HTML, CSS, Git, or programming experience is needed.
The tools for today
- A text editor that saves plain text: VS Code. A word processor will not do.
- A terminal, where you type one command and press Enter. Do not type the prompt, such as
PS>or$. - Hugo, which builds and previews the site
Today you do not need a GitHub account, a domain name, or an AI subscription.
Install Hugo, then check it
- Windows:
winget install Hugo.Hugo.Extended, then reopen PowerShell - macOS:
brew install hugo - Linux: follow the official Linux installation guide
Check that it runs:
hugo versionUse version 0.146.0 or later, and write the version in your learning note. If hugo is not recognised, fix the installation before going on.
Create the project
Make a folder my-knowledge-site, open it in VS Code, and add four files:
| File | Its job |
|---|---|
hugo.toml | The site’s basic settings (locale = 'en') |
content/_index.md | The home-page text (leading _ = section/home) |
layouts/all.html | The page structure (supplied) |
static/css/site.css | The appearance (supplied) |
(Copy starter code from the book or clone ssg-playground branch chapter-01)
Which file does what
| File | Change it to adjust |
|---|---|
content/_index.md | The home-page heading and text |
hugo.toml | The site name and basic settings |
layouts/all.html | How pages are structured |
static/css/site.css | Colours, spacing, and typography |
You changed the words without touching the layout. Edit the source files, never a generated public folder.
Break something on purpose
- Save your work, and copy the introduction into a separate note
- Replace it with:
This paragraph was changed by mistake. - Save: the site still works, but the content is wrong
- Use Undo until your text returns, then save again
A page can build successfully and still contain the wrong information.
Where AI agents will fit
(Concept preview — no AI tool setup needed today)
A bounded request names the file, the goal, and the limits:
Read content/_index.md. Propose a clearer version of its
introduction using only the information already present.
Keep the meaning and first-person voice. Do not change the
title, section headings, configuration, layout, or stylesheet.
Show the proposed replacement before editing the file.If an agent invented a qualification, you would reject it, however polished it sounded.
Stop, restart, and back up
- Stop the preview: click in the terminal and press Ctrl+C (also on macOS)
- Restart it later with
hugo server - Back up: stop the server, save everything, and copy the whole folder to
my-knowledge-site-ch01-backup, next to the project, not inside it
Keep working in the original folder next time.
When something goes wrong
| What you see | What to do |
|---|---|
hugo is not recognised | Reopen the terminal; check the installation |
| Hugo cannot find the project | Move the terminal to the folder with hugo.toml |
| A connection error | Check hugo server is still running |
| Port 1313 is in use | Stop the old preview, or use --port 1314 |
Change one thing at a time, and keep the error message.