in every generation, a blogger is chosen. it's you!!! =D
hihi Leah!! this page walks you through making a real blog from scratch, on your Windows laptop, using Hugo (the thing that turns your writing into a website), git (the thing that remembers every version of your files), and GitLab Pages (the thing that puts your site on the internet, for free).
go in order. each step has a checkbox so you can see how far you got (it remembers, even if you close the tab). if anything looks weird or scary, that's totally normal, just ask me!! (i'm probably right next to you lol)
the terminal is a window where you type commands instead of clicking. it looks hacker-y but it's just a different way of talking to your computer.
terminal, and open Terminal (on older Windows it might be called PowerShell, that's fine too).winget --versionif it prints a version number (like v1.9.something), you're good!!
Ctrl+V. every grey box on this page has a copy button.paste these one at a time. say yes to any popups asking for permission.
winget install Git.Git
winget install Hugo.Hugo.Extended
winget install Microsoft.VisualStudioCodethen check that everything worked:
git --version
hugo versionyou should see version numbers for both, and the Hugo one should say +extended somewhere in it.
git stamps a name and an email on every snapshot you save, and anyone who looks at your public project can see them. so we're NOT gonna use your real email. GitLab gives you a secret private one instead!! =D
12345678-leah_bear@users.noreply.gitlab.com (the numbers are your user ID).you only do this once, ever. the name is public too, so use whatever name you want people to see (your first name, or a handle like leah_bear). paste your private email where it says:
git config --global user.name "Leah"
git config --global user.email "PASTE-YOUR-PRIVATE-EMAIL-HERE"
git config --global init.defaultBranch maindouble check it worked:
git config --global user.emailit should print your ...@users.noreply.gitlab.com address. no real email anywhere!! 🔒
main by default, so we match it.remember the src folder i had you make? that's where all your coding projects live! src is short for source, which is short for source code: the files you write, that your projects get built from. (Hugo is gonna take your source code and build a website out of it!)
let's go into src and have Hugo make a new site there:
cd ~
cd src
hugo new site blog
cd blog
git initcd means "change directory" (directory is just another word for folder). so cd src means "go into the src folder."~ (the squiggle, called a tilde) means your home folder. on Windows that's usually C:\Users\leah (or whatever your Windows username is). so cd ~ means "go home," and your src folder is really at C:\Users\leah\src.hugo new site blog makes a new folder called blog with a starter Hugo site in it.git init turns this folder into a git project, so git starts paying attention to it.pwd ("print working directory") anytime to see which folder you're in. after the commands above it should end in \src\blog.now open the folder in VS Code:
code .(the . means "this folder right here"). you'll see some folders on the left: content is where your posts go, themes is where themes go, and hugo.toml is your site's settings file.
we're using PaperMod, a clean, super readable theme with a dark mode. later we'll paint it Buffy colors.
git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperModthemes/PaperMod. all your changes go in your own folders (you'll see!).in VS Code, open hugo.toml, delete everything in it, and paste this in. then change the title and the welcome words to whatever you want!!
baseURL = 'https://leah_bear.gitlab.io/'
languageCode = 'en-us'
title = "Leah's Blog"
theme = 'PaperMod'
[params]
defaultTheme = 'dark'
disableThemeToggle = true
ShowReadingTime = true
ShowPostNavLinks = true
ShowBreadCrumbs = false
[params.homeInfoParams]
Title = 'Welcome to the Hellmouth'
Content = 'a blog by Leah. stakes, snacks, and Python homework.'
[[menu.main]]
name = 'Posts'
pageRef = 'posts'
weight = 10
[[menu.main]]
name = 'Tags'
pageRef = 'tags'
weight = 20this file is in a format called TOML. it's just name = value pairs, and the [bracket] lines start a new group of settings.
next, make a file called .gitignore in your blog folder (right click in VS Code's file list → New File). paste this in:
public/
resources/_gen/
.hugo_build.lock.gitignore lists stuff git should NOT save. public/ is where Hugo puts the finished website when it builds. we don't save that, because GitLab builds a fresh one every time you push.hugo new content posts/first-slay/index.mdthis makes a folder content/posts/first-slay/ with an index.md inside. each post gets its own folder, so you can drop pictures in right next to it.
open that index.md. the top part between the +++ lines is the post's info ("front matter"). Hugo already filled in the date and title for you. keep the date it made (a date in the future makes the post hide!), but change draft = true to draft = false and add a tags line. the top will look kinda like this (your date will be different):
+++
date = '2026-11-30T19:00:00-08:00'
draft = false
title = 'First Slay'
tags = ['hello', 'meta']
+++then write your post underneath the second +++. here's some to start with:
hello world!!! this is my **first post** on my brand new blog.
## things i learned today
- what a terminal is
- that git remembers everything
- [Hugo](https://gohugo.io) is fast
the writing part is Markdown!! it's a markup language, which is a way of adding little marks to plain text to say "this part is bold" or "this is a heading." HTML is a markup language too, but it's kinda wordy (<strong>hi</strong>). Markdown is the super simple version (**hi**), so it got called Markdown as a joke: it's markup, but marked down lol. Hugo turns your Markdown into HTML for you.
the basics: **bold**, *italic*, ## heading, - list item, [link text](url). that's most of it!! for the rest, the Markdown Guide basic syntax page is a great cheat sheet to keep open.
for the picture, put an image file named stake.png into the same first-slay folder (or delete that line for now).
hugo serverthen open http://localhost:1313/ in your browser. that's your blog!!! =D
leave it running. every time you save a file in VS Code, the page refreshes by itself. magic. to stop the server, click in the terminal and press Ctrl+C.
leah_bear.gitlab.io (yes, the whole web address is the name!)leah_bear.gitlab.io. the slug is the part that goes in the URL, and it's the one that matters.yourusername.gitlab.io, its website lives at the very top of your address, https://leah_bear.gitlab.io/, with nothing tacked on the end. this is your official home on the internet!! (your old Pelican practice site keeps living at /pelican/, they don't fight.)blog though? totally fine! the folder name on your laptop and the project name on GitLab don't have to match. step 10 is where we connect them.GitLab shows you a page of instructions. you can ignore them, we've got our own =)
GitLab needs instructions for how to build your site. make a new file in your blog folder called .gitlab-ci.yml (with the dot at the start!) and paste in:
default:
image: hugomods/hugo:exts
variables:
GIT_SUBMODULE_STRATEGY: recursive
pages:
script:
- hugo --gc --minify --baseURL "$CI_PAGES_URL/"
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCHin plain words, this says:
hugo to build the site, at whatever URL GitLab Pages gives us"public folder, publish that"main branch".yml files, the indentation (2 spaces) is part of the meaning. use the copy button and don't retype it.stop hugo server if it's running (Ctrl+C), then:
git add .
git commit -m "my first blog!!"
git remote add origin https://gitlab.com/leah_bear/leah_bear.gitlab.io.git
git push -u origin maingit add . = "get ALL my changes ready to save"git commit -m "..." = "save a snapshot, with this little note about what changed"git remote add origin ... = "my project on GitLab lives at this address" (only needed once, ever)git push = "send my snapshots up to GitLab"the first time you push, a window pops up asking you to log in to GitLab. pick the browser option and log in. git remembers you after that.
leah-bear-gitlab-io-a1b2c3.gitlab.io): on that same Deploy → Pages screen, uncheck "Use unique domain" and save. then your address becomes just https://leah_bear.gitlab.io/ =D (if your browser keeps sending you to the random one, it remembered the old address. try a private/incognito window.)the very first deploy can take a few minutes to show up. if you get a 404, get a snack and refresh. 🍩
once it works: YOU HAVE A BLOG ON THE INTERNET!!!! 🎉
this is the fun part, and it's where you learn real CSS. PaperMod lets you add your own styles on top of its styles, without touching the theme.
make this file (you'll need to make the layouts and partials folders too):
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Grenze+Gotisch:wght@500;700&family=Crimson+Pro:ital,wght@0,400;0,600;1,400&display=swap" rel="stylesheet"><head> of every page. this is your first time overriding a theme! the <link> tags load two free fonts from Google Fonts.make this file (new folders again: assets, css, extended):
/* ✝ welcome to the hellmouth ✝ */
/* PaperMod keeps its colors in "variables". we change them here. */
:root,
.dark,
:root[data-theme="dark"] {
--theme: #0d0a0b; /* page background */
--entry: #1a1214; /* post card background */
--primary: #f3e6d6; /* titles */
--secondary: #b9a99a; /* dates, small text */
--tertiary: #3a2226; /* hover stuff */
--content: #eadcc9; /* main text */
--code-bg: #24171a; /* code blocks */
--border: #4a1c22; /* lines */
}
body {
font-family: 'Crimson Pro', Georgia, serif;
font-size: 19px;
}
/* gothic headings */
h1, h2, h3,
.logo a,
.post-title,
.entry-header h2 {
font-family: 'Grenze Gotisch', serif;
letter-spacing: 0.5px;
}
.post-title,
.first-entry .entry-header h1,
.logo a {
color: #e0303f;
text-shadow: 0 2px 14px rgba(224, 48, 63, 0.35);
}
/* links that bleed when you hover */
.post-content a {
color: #ff5a68;
box-shadow: none;
border-bottom: 1px solid #8a1622;
}
.post-content a:hover {
color: #fff;
background: #8a1622;
}
/* post cards on the home page */
.post-entry {
border: 1px solid var(--border);
}
.post-entry:hover {
border-color: #e0303f;
}
/* when you highlight text */
::selection {
background: #8a1622;
color: #fff;
}run hugo server and look at localhost:1313. sunnydale vibes!!! 🧛
now change stuff and see what happens!! try:
#e0303f to a different color. (google "hex color picker", or click the little color square VS Code shows next to it!)font-size.F12). it shows you the HTML and which CSS is styling it. you can even edit the CSS live right there to experiment, then copy what you like into buffy.css. this is how real web people figure stuff out!!when you like it, save it to GitLab:
git add .
git commit -m "make it buffy"
git pushfrom now on, writing a post is always the same 4 moves:
# 1. make a new post (use your own post name, no spaces)
hugo new content posts/my-new-post/index.md
# 2. preview while you write (remember draft = false!)
hugo server
# 3. save a snapshot
git add .
git commit -m "new post: my new post"
# 4. publish!
git pushlines starting with # are just comments, notes for humans. the terminal ignores them.
| command | what it does |
|---|---|
git status | "what changed since my last snapshot?" use it ALL the time |
git diff | shows exactly which lines changed |
git log --oneline | lists all your past snapshots (press q to exit) |
git add . | get everything ready to save |
git commit -m "note" | save the snapshot |
git push | send it to GitLab (which publishes your site) |
whenever you're feeling it, in any order:
content/about.md, then add it to the menu in hugo.toml (copy one of the [[menu.main]] blocks, and use pageRef = 'about').favicon.ico in a static folder.themes/PaperMod/layouts/partials/footer.html, copy it to layouts/partials/footer.html in YOUR folders, and change the words. yours wins over the theme's!right now, git logs in to GitLab using your browser (that popup from step 10). that works great! but real nerds use SSH keys, and you'll need them anyway the first time you log in to a server or a Raspberry Pi. so let's learn it!!
1. make your key pair. in the terminal:
ssh-keygen -t ed25519 -C "leah's laptop"C:\Users\leah\.ssh\).now you have two files in your .ssh folder: id_ed25519 (PRIVATE, keep secret!!) and id_ed25519.pub (public, .pub = public, safe to share).
2. copy your PUBLIC key. this copies it right onto your clipboard:
Get-Content ~\.ssh\id_ed25519.pub | Set-Clipboard.pub!! if you paste it somewhere, it should start with ssh-ed25519 and end with leah's laptop. if you ever see something that says BEGIN OPENSSH PRIVATE KEY, that's the secret one. don't paste that anywhere!3. give GitLab the padlock.
Ctrl+V). the title fills itself in.4. test it!
ssh -T git@gitlab.comthe very first time, it says something like "The authenticity of host 'gitlab.com' can't be established... Are you sure you want to continue connecting?" that's your computer saying "i've never met this server before." it's normal! type yes and press Enter. (super careful people compare the fingerprint it shows with the ones GitLab publishes. let's do it together the first time!)
type your passphrase, and you should see:
Welcome to GitLab, @leah_bear!🎉 GitLab knows it's you!!
5. switch your blog over to SSH. in your blog folder:
git remote set-url origin git@gitlab.com:leah_bear/leah_bear.gitlab.io.git
git remote -vthe second command shows your remote address. it should start with git@gitlab.com: now instead of https://. next time you git push, git asks for your passphrase instead of popping up the browser. that's it!!
there's a helper called ssh-agent that remembers your unlocked key until you restart your laptop. setting it up on Windows takes a few steps:
open a terminal as administrator (Windows key → type terminal → right click → Run as administrator) and run:
Get-Service ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agentclose that, then in a normal terminal:
ssh-add
git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe"ssh-add gives your key to the agent (it asks for your passphrase one last time).git config line tells git to use Windows' own SSH, which is the one that knows about the agent.first: you can't break anything permanently. git remembers everything. breathe =)
| what you see | try this |
|---|---|
hugo or git "is not recognized" | close the terminal and open a new one. still broken? re-run the install from step 2. |
| the site works but looks totally plain (no styles) | usually the theme is missing. run git submodule update --init --recursive, and check theme = 'PaperMod' in hugo.toml (capital P and M!). |
| my new post isn't showing up | check for draft = false in the post. also check the date isn't in the future! |
| pipeline is red ✗ | click on it, then click the failed job to read the log. the error is usually near the bottom. copy it and show Judy, or paste it into an AI and ask "what does this mean?" |
| 404 on the live site | wait a few minutes after the first deploy. check Deploy → Pages for the exact link. check the project is Public. |
git push says "rejected" or "fetch first" | GitLab has a change you don't have yet (maybe you edited on the website). run git pull, then git push again. |
Permission denied (publickey) | (only after the SSH side quest) GitLab doesn't recognize your key. run ssh -T git@gitlab.com to test. check that you pasted the .pub key into GitLab, and that it hasn't expired. |
terminal is stuck in a weird screen with : at the bottom | press q. (that's a text viewer, it's waiting for you to quit.) |
terminal is stuck in a weird editor after git commit | you forgot the -m "note" part! type :wq and press Enter to escape. (yes really lol, that's vim) |