Skip to content

Commit f519dc1

Browse files
feat: CNCK blog with minimal monochrome Zola theme
- Zola 0.22 site with custom CNCK theme (themes/cnck) - Monochrome design: serif body, mono metadata, light/dark toggle - Blog section, tags taxonomy, about page, Atom feed, search index - Giallo class-based syntax highlighting (github-light/dark) - GitHub Actions deploy to GitHub Pages
0 parents  commit f519dc1

25 files changed

Lines changed: 1122 additions & 0 deletions

β€Ž.github/workflows/deploy.ymlβ€Ž

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
# Allow the workflow to publish to GitHub Pages via OIDC.
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# One deploy at a time; let an in-flight production deploy finish.
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: false
18+
19+
env:
20+
ZOLA_VERSION: "0.22.1"
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
with:
29+
submodules: recursive
30+
31+
- name: Configure Pages
32+
id: pages
33+
uses: actions/configure-pages@v5
34+
35+
- name: Install Zola
36+
run: |
37+
curl -sSfL "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
38+
| tar -xz -C /usr/local/bin zola
39+
zola --version
40+
41+
- name: Build
42+
# Override base_url with the URL resolved by configure-pages so the
43+
# same source builds correctly regardless of the Pages domain.
44+
run: zola build --base-url "$PAGES_BASE_URL"
45+
env:
46+
PAGES_BASE_URL: ${{ steps.pages.outputs.base_url }}
47+
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: public
52+
53+
deploy:
54+
needs: build
55+
runs-on: ubuntu-latest
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
steps:
60+
- name: Deploy to GitHub Pages
61+
id: deployment
62+
uses: actions/deploy-pages@v4

β€Ž.gitignoreβ€Ž

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Zola build output
2+
/public/
3+
4+
# Generated syntax-highlight CSS (regenerated on every build)
5+
/static/giallo-*.css
6+
7+
# Editor / OS noise
8+
.DS_Store
9+
*.swp
10+
.idea/
11+
.vscode/

β€ŽREADME.mdβ€Ž

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# cnck-blog.github.io
2+
3+
The [CNCK blog](https://cnck-blog.github.io), built with [Zola](https://www.getzola.org) 0.22 and the **CNCK** theme.
4+
5+
CNCK is a minimal monochrome Zola theme: serif body text, monospaced metadata, generous whitespace, and a light/dark toggle that follows the OS preference until you override it.
6+
7+
## Requirements
8+
9+
- [Zola](https://www.getzola.org/documentation/getting-started/installation/) `0.22.x`
10+
11+
## Local development
12+
13+
```bash
14+
zola serve # live reload at http://127.0.0.1:1111
15+
zola build # output to ./public
16+
zola check # validate links and content
17+
```
18+
19+
## Structure
20+
21+
```
22+
.
23+
β”œβ”€β”€ config.toml # site configuration
24+
β”œβ”€β”€ content/ # markdown content
25+
β”‚ β”œβ”€β”€ _index.md # home page intro
26+
β”‚ β”œβ”€β”€ about.md # about page
27+
β”‚ └── blog/ # posts (sorted by date)
28+
β”œβ”€β”€ static/ # static assets served at /
29+
β”œβ”€β”€ themes/cnck/ # the CNCK theme
30+
β”‚ β”œβ”€β”€ theme.toml
31+
β”‚ β”œβ”€β”€ templates/ # Tera templates
32+
β”‚ β”œβ”€β”€ sass/ # stylesheets (compiled by Zola)
33+
β”‚ └── static/js/ # theme toggle script
34+
└── .github/workflows/ # GitHub Pages deploy
35+
```
36+
37+
## Writing a post
38+
39+
Create `content/blog/<slug>.md`:
40+
41+
```toml
42+
+++
43+
title = "Post title"
44+
date = 2026-06-01
45+
description = "One-line summary used for meta tags and listings."
46+
[taxonomies]
47+
tags = ["kubernetes", "rust"]
48+
[extra]
49+
toc = true # render a table of contents
50+
+++
51+
52+
Body in Markdown.
53+
```
54+
55+
## Configuration
56+
57+
Site-wide options live in `config.toml`. The theme reads these `[extra]` keys:
58+
59+
- `author`, `author_url` β€” used in footer and meta tags
60+
- `tagline` β€” shown under the title on the home page
61+
- `nav` β€” header navigation links
62+
- `social` β€” footer links
63+
- `theme_switcher` β€” show the light/dark toggle
64+
65+
## Deployment
66+
67+
Pushing to `main` triggers `.github/workflows/deploy.yml`, which installs Zola, builds the site, and publishes it to GitHub Pages. Enable **Settings β†’ Pages β†’ Source: GitHub Actions** once on the repository.
68+
69+
## License
70+
71+
Theme code is MIT licensed. Post content is Β© the author.

β€Žconfig.tomlβ€Ž

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# https://www.getzola.org/documentation/getting-started/configuration/
2+
base_url = "https://cnck-blog.github.io"
3+
title = "CNCK"
4+
description = "Writing about infrastructure, systems, and the craft of running them."
5+
default_language = "en"
6+
7+
theme = "cnck"
8+
9+
# Build features
10+
compile_sass = true
11+
minify_html = true
12+
generate_feeds = true
13+
feed_filenames = ["atom.xml"]
14+
build_search_index = true
15+
16+
taxonomies = [
17+
{ name = "tags", feed = true, paginate_by = 10 },
18+
]
19+
20+
[markdown]
21+
smart_punctuation = true
22+
render_emoji = false
23+
24+
# Zola 0.22 switched the highlighter from Syntect to Giallo; all options now
25+
# live under [markdown.highlighting]. style = "class" emits CSS classes instead
26+
# of inline colors, and the two themes below auto-generate giallo-light.css and
27+
# giallo-dark.css so the palette can follow light/dark.
28+
[markdown.highlighting]
29+
style = "class"
30+
light_theme = "github-light"
31+
dark_theme = "github-dark"
32+
33+
[search]
34+
index_format = "elasticlunr_json"
35+
36+
[extra]
37+
# Theme-level configuration consumed by templates.
38+
author = "younsl"
39+
author_url = "https://github.com/younsl"
40+
# Lines shown under the site title on the home page.
41+
tagline = "Writing about infrastructure & systems."
42+
# Primary navigation. `path` is relative to base_url.
43+
nav = [
44+
{ name = "blog", path = "/blog/" },
45+
{ name = "tags", path = "/tags/" },
46+
{ name = "about", path = "/about/" },
47+
]
48+
# Footer social links. Rendered as plain text links.
49+
social = [
50+
{ name = "github", url = "https://github.com/cnck-blog" },
51+
{ name = "rss", url = "/atom.xml" },
52+
]
53+
# Toggle the floating dark/light switch in the header.
54+
theme_switcher = true

β€Žcontent/_index.mdβ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
+++
2+
# The home page. Rendered by the theme's index.html.
3+
# Any prose written here appears under the tagline.
4+
+++
5+
6+
Notes on building and operating infrastructure: Kubernetes, observability,
7+
release engineering, and the occasional Rust tool. Mostly written so I remember
8+
how I solved something the next time around.

β€Žcontent/about.mdβ€Ž

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
+++
2+
title = "About"
3+
description = "What this site is and who writes it."
4+
template = "page-plain.html"
5+
+++
6+
7+
**CNCK** is a place to write down things worth remembering: how a system was
8+
built, why a tradeoff was made, and what broke at 3am.
9+
10+
Written by [younsl](https://github.com/younsl), an infrastructure engineer.
11+
Topics tend toward Kubernetes, AWS, observability, and the tooling that keeps
12+
production boring.
13+
14+
The site is built with [Zola](https://www.getzola.org) and the **CNCK** theme,
15+
a minimal monochrome design that gets out of the way of the text.
16+
17+
- Source: [github.com/cnck-blog/cnck-blog.github.io](https://github.com/cnck-blog/cnck-blog.github.io)
18+
- Feed: [atom.xml](/atom.xml)

β€Žcontent/blog/_index.mdβ€Ž

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
+++
2+
title = "Blog"
3+
description = "All posts, newest first."
4+
sort_by = "date"
5+
paginate_by = 10
6+
template = "section.html"
7+
page_template = "page.html"
8+
generate_feeds = true
9+
+++
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
+++
2+
title = "A Small Rust CLI That Earns Its Keep"
3+
date = 2026-04-27
4+
description = "When a shell script grows up: reaching for Rust without over-engineering."
5+
[taxonomies]
6+
tags = ["rust", "tooling"]
7+
[extra]
8+
toc = false
9+
+++
10+
11+
Not every script needs to become a program. But once a shell script grows past
12+
a screen, sprouts flags, and starts parsing JSON, the maintenance cost flips.
13+
A tiny Rust CLI is often the cheaper long-term option.
14+
15+
```rust
16+
use std::process::ExitCode;
17+
18+
fn main() -> ExitCode {
19+
let args: Vec<String> = std::env::args().skip(1).collect();
20+
match args.first().map(String::as_str) {
21+
Some("version") => {
22+
println!("{}", env!("CARGO_PKG_VERSION"));
23+
ExitCode::SUCCESS
24+
}
25+
_ => {
26+
eprintln!("usage: tool <command>");
27+
ExitCode::FAILURE
28+
}
29+
}
30+
}
31+
```
32+
33+
The win isn't speed, it's the type system catching the edge cases you'd
34+
otherwise discover in production: the empty input, the missing field, the
35+
timezone. Ship a single static binary and the operational story gets simpler too.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
+++
2+
title = "Draining Kubernetes Nodes Without Waking Anyone"
3+
date = 2026-05-18
4+
description = "PodDisruptionBudgets, terminationGracePeriod, and the small settings that make node rotation boring."
5+
[taxonomies]
6+
tags = ["kubernetes", "operations"]
7+
[extra]
8+
toc = true
9+
+++
10+
11+
Rotating nodes should be a non-event. In practice it pages people, because the
12+
defaults optimize for "it works on an empty cluster," not "it works while
13+
serving traffic." Here are the knobs that matter.
14+
15+
## PodDisruptionBudgets
16+
17+
A `PodDisruptionBudget` tells the eviction API how much disruption a workload
18+
can tolerate. Without one, `kubectl drain` will happily evict every replica at
19+
once.
20+
21+
```yaml
22+
apiVersion: policy/v1
23+
kind: PodDisruptionBudget
24+
metadata:
25+
name: api
26+
spec:
27+
minAvailable: 80%
28+
selector:
29+
matchLabels:
30+
app: api
31+
```
32+
33+
Prefer `minAvailable` as a percentage over an absolute count, so it scales with
34+
the deployment.
35+
36+
## Termination grace period
37+
38+
The drain sends `SIGTERM`, then waits `terminationGracePeriodSeconds` before
39+
`SIGKILL`. Your app must:
40+
41+
1. Stop accepting new connections on `SIGTERM`.
42+
2. Finish in-flight requests.
43+
3. Exit before the deadline.
44+
45+
> If your readiness probe keeps the pod in rotation during shutdown, you'll drop
46+
> requests no matter how long the grace period is. Fail readiness first.
47+
48+
## Putting it together
49+
50+
With a PDB, a sane grace period, and a `preStop` sleep to let the load balancer
51+
deregister, a full node roll becomes something you can run at 2pm instead of 2am.

β€Žcontent/blog/hello-cnck.mdβ€Ž

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
+++
2+
title = "Hello, CNCK"
3+
date = 2026-06-01
4+
description = "Why this blog exists and how it's put together."
5+
[taxonomies]
6+
tags = ["meta", "zola"]
7+
[extra]
8+
toc = false
9+
+++
10+
11+
This is the first post on **CNCK**, a small blog built with
12+
[Zola](https://www.getzola.org) and a minimal monochrome theme of the same name.
13+
14+
The goal is simple: write things down. Most posts here start as notes I wished
15+
existed when I was solving a problem, polished just enough to be useful later.
16+
17+
## The stack
18+
19+
- **Zola 0.22** for the static site, a single Rust binary with Sass, search,
20+
feeds, and syntax highlighting built in.
21+
- A custom **CNCK** theme: serif body text, monospaced metadata, a lot of
22+
whitespace, and a light/dark toggle.
23+
- **GitHub Pages** for hosting, deployed automatically on every push to `main`.
24+
25+
## What to expect
26+
27+
Short, practical posts about infrastructure and the systems around it. If a
28+
post saves one person an afternoon of debugging, it earned its place.

0 commit comments

Comments
Β (0)