A small static blog. Markdown files go in, a website comes out. Built with
Eleventy, published to GitHub Pages by GitHub Actions
on every push to main.
Writing and publishing is designed to be frictionless — whether on a Mac or on an iPad in Working Copy:
Place any photos or screenshots directly into assets/images/:
- Paths: Always reference images using root-relative paths like
/assets/images/photo.png. - Automatic optimization: You don't need to resize or convert anything manually. Eleventy automatically generates responsive WebP variants (400px, 800px, 1200px) at build time.
- Original size: Keep originals under ~2000px wide so the git repository stays lightweight.
- Downloadable files: PDFs, ZIPs, and other downloads go in
assets/files/(linked as/assets/files/document.pdf).
Add a new markdown file to posts/. The filename becomes the URL slug:
posts/my-new-post.mdpublishes at/blog/my-new-post/.
Every post starts with a YAML front matter block between --- lines:
---
title: "Printing straight into Evernote on macOS"
description: A quick tip to send a PDF straight to Evernote from the print dialog.
date: 2025-12-08
tags:
- macOS
- Evernote
image: /assets/images/banner.jpg
imageAlt: Print dialog with Evernote quick action selected
# featured: true
# featuredNote: Send PDFs to Evernote directly from the print dialog.
# redirectFrom:
# - /2025/12/08/printing-straight-into-evernote-on.html
---
The post itself starts here, in normal markdown.| Field | Required | What it does |
|---|---|---|
title |
yes | Heading, page title, and the link on the home page. Wrap in quotes if it contains : or #. |
date |
yes | YYYY-MM-DD. Controls post ordering and archive grouping. |
description |
no | Intro lead paragraph under the title, home page summary, search results, and link previews. |
tags |
no | List of tags. Creates /tags/<tag>/ pages automatically. |
image |
no | Banner/hero image shown at the top of the post (e.g. /assets/images/photo.jpg). Also sets Open Graph & Twitter card previews. |
imageAlt |
no | Alt text describing the banner image for accessibility. |
redirectFrom |
no | List of legacy URLs to forward here (e.g. old micro.blog addresses). |
featured |
no | Set to true to pin this post as the yellow sticky note on the home page. If multiple posts are marked, the newest wins. |
featuredNote |
no | Short line shown on that note. Falls back to description if omitted. |
Careful with
#and:— if a title or description contains either, wrap the whole value in double quotes, or YAML will misread it:title: "Mapping § to # on a British keyboard"
Always use root-relative paths starting with /assets/images/:
- Hero / Banner Image (Top of post):
Set
imageandimageAltin the front matter (see table above). It renders above the article body and automatically populates social card previews. - Inline Body Images & Captions:
Reference the path in standard markdown, with an optional italic line directly beneath for a styled, centered caption:
 *An optional italic line directly underneath becomes the caption.*
- Preview locally (optional):
Open
npm start
http://localhost:8080. - Publish:
Commit and push to
main:GitHub Actions will automatically run the build and publish the site to GitHub Pages in about a minute.git add posts/ assets/images/ git commit -m "Add new post: My Post Title" git push origin main
| I want to change... | Look in |
|---|---|
| Colours, fonts, spacing | assets/css/style.css — the tokens at the very top cover most of it |
| Site title, description, nav button | _data/site.js |
| Page structure | _layouts/base.njk, post.njk, page.njk |
| The home page listing | index.njk |
| How many posts per page | size: 3 in index.njk's front matter |
| About text | pages/about.md |
| Build behaviour | eleventy.config.js |
npm install
npm startThen open http://localhost:8080. It reloads as you save.
To do a one-off production build into _site/:
npm run build.github/workflows/deploy.yml runs on every push to main: it installs
dependencies, runs the Eleventy build, and uploads _site/ to GitHub Pages.
If a build ever fails, the previous version of the site stays up and the
Actions tab will show what went wrong.
The site currently publishes to https://antcooper.github.io/. antcooper.com
still points at micro.blog, and nothing here affects it until you change DNS.
The custom domain is deliberately not set yet: as soon as GitHub Pages knows
about it, the github.io address starts redirecting there — which would leave
you unable to preview. So the switch is one step, done when you're ready:
-
At your DNS provider, point
antcooper.comat GitHub Pages. FourArecords on the apex:185.199.108.153 185.199.109.153 185.199.110.153 185.199.111.153And a
CNAMEforwwwpointing toantcooper.github.io. -
Add a file called
CNAMEin the root of this repository containing exactly:antcooper.comCommit and push it. The build already knows to copy that file through, and GitHub Pages picks up the domain from it.
-
In the repo's Settings → Pages, tick Enforce HTTPS once the certificate has been issued (usually within an hour).
Until step 2 happens, antcooper.github.io serves the site normally.
Posts live at /blog/<filename>/. The old micro.blog addresses
(/2025/12/08/printing-straight-into-evernote-on.html) still work: each post
lists them under redirectFrom, and the build generates a small forwarding page
for each one. Feeds stayed where they were, at /feed.xml and /feed.json, so
existing subscribers don't notice the move.