Turn the blog into a project landing page
Build and deploy the poweronoff.click hugo / build (push) Successful in 45s

The site is now a single page introducing Stan and listing his projects, with a
short description and a link for each. Blog posts, the about page, the post
archetype and the new-post helper are gone (git history keeps them). The
Impressum and Datenschutzerklärung stay: they are legally required and the
footer links to them.

Projects are data-driven:
- data/projects.yaml: name, url, description, optional status/tags
- layouts/shortcodes/projects.html: renders cards and fails the build when a
  required field is missing or the URL is not absolute
- layouts/_partials/extend_head.html: card CSS using PaperMod variables, so
  light/dark keeps working; no theme fork

First entry is Berlin Crime Stories, described from its own site (German crime
stories set in Berlin, published in German/English/Russian).

Config: site title and copy retargeted to projects, homeInfoParams/menu/social
icons/pagination/search output removed, taxonomies disabled (no posts), locale
set to de so html lang and og:locale are German. make check now also asserts
that the cards, the Berlin Crime Stories link and both legal pages exist, and
make new-project documents how to add one.
This commit is contained in:
morpheus committed 2026-11-06 10:40:48 +01:00
1 parent d59b91c4bd
commit ae2aab5753
15 files changed
+259 -390

No files matched your search

+65 -54
View File
@@ -5,9 +5,14 @@ with the tooling; if a command below stops working, fix the command here first.
## What this is
The Hugo source of https://poweronoff.click, a German-language blog about agile
leadership and engineering management by Stan Nowogrudski. Theme: PaperMod
(git submodule). Deployed by Gitea Actions via `scp` on every push to `master`.
The single-page landing site behind https://poweronoff.click. It introduces
Stan Nowogrudski and lists his projects with a short description and a link to
each one. Hugo + PaperMod, German copy. Projects are data-driven, so adding a
project is one YAML entry, not a new page.
The site used to be a blog. All blog posts and pages were removed on purpose;
they only exist in git history. Do not recreate `content/posts`, taxonomies or
`layouts/partials/footer.html` unless explicitly asked.
## Commands
@@ -22,82 +27,88 @@ make check HUGO_IMAGE=ghcr.io/gohugoio/hugo:v0.169.0
```sh
make build # production build into public/ (minified)
make serve # http://localhost:1313 with drafts, live reload
make check # build + generated-site assertions + internal link check
make new slug=my-post title="Mein Titel" # new draft page bundle
make serve # http://localhost:1313, live reload
make check # build + site assertions + internal link check
make clean # remove public/ and resources/
make theme-update # bump the PaperMod submodule, then review + `make check`
make new-project # reminder: add an entry to data/projects.yaml
```
`make check` is the definition of done for any change. It fails on placeholder
text, a leaked `localhost:1313` base URL, or broken internal links.
`make check` is the definition of done. It fails if there is no project card,
if the Berlin Crime Stories entry disappears, if the Impressum/Datenschutz
pages are missing, if placeholder text or a dev base URL leaks into `public/`,
or if an internal link does not resolve.
## Layout
| Path | Meaning |
| --- | --- |
| `config.yml` | All site config: params, menus, social icons, footer text |
| `content/posts/<slug>/index.md` | Page bundle per post; cover image may live next to it |
| `content/*.md` | Standalone pages (about, impressum, data protection) |
| `config.yml` | Site config: title, language, params, footer text, analytics |
| `content/_index.md` | Landing page copy (intro, `{{< projects >}}`, contact) |
| `data/projects.yaml` | **Project list.** One entry per card, order = page order |
| `layouts/shortcodes/projects.html` | Renders + validates the cards from the data file |
| `layouts/_partials/extend_head.html` | Card CSS, home page only |
| `content/impressum.md`, `content/data_protection.md` | Legal pages, must stay |
| `layouts/shortcodes/obfuscate.html` | Base64 email obfuscation shortcode |
| `static/` | Files served at the site root (images, icons) |
| `static/` | Files served at the site root (icons, images) |
| `themes/PaperMod` | Git submodule. **Never edit it.** Override from `layouts/` instead |
| `.gitea/workflows/build.yml` | Build, deploy, Telegram notification |
| `.gitea/workflows/build.yml` | Build, deploy (rsync), Telegram notification |
Do not recreate `layouts/partials/footer.html`. It used to be a copy of the
theme footer, which silently stopped working when PaperMod moved to
`layouts/_partials/` (the legal links disappeared from the site). The
Datenschutz/Impressum links now come from `params.footer.text` in `config.yml`.
## Adding or changing a project
Edit `data/projects.yaml`. Fields:
- `name` — display name, required
- `url` — absolute `https://` URL, required
- `description` — one or two German sentences for the card, required
- `status` — short badge, e.g. `live`, `beta`, `in Arbeit` (optional)
- `tags` — short labels (optional)
Put new projects at the top. The shortcode calls `errorf` when a required field
is missing or the URL is not absolute, so a broken entry fails the build instead
of shipping an empty card. Do not create per-project Hugo pages — the card links
out to the project's own site. Card styling lives in
`layouts/_partials/extend_head.html`; keep using PaperMod CSS variables
(`--entry`, `--border`, `--secondary`, ...) so light/dark mode keeps working.
## Writing rules
- Posts are written in **German**. Do not translate existing content unless asked.
The English "How to work with me" page was removed in 2026; `content/howto-work-with-stan.md`
is only recoverable from git history.
- Voice: first person, opinionated, practical. Do not add marketing filler.
- New posts start as `draft: true`. `buildDrafts` is off, so drafts never deploy.
- The paragraph before `<!--more-->` becomes the summary; make it meaningful.
- Front matter fields used by the theme: `title`, `date`, `draft`, `tags`,
`categories`, `ShowToc`, `ShowBreadCrumbs`, `cover.{image,alt,caption,relative}`.
- Cover images go in `static/` and are referenced by absolute path
(`/name.jpg`), even with `relative: true`. Use the unsplash/free license
credit in `caption` when the photo is not ours.
- Keep images out of `static/` unless they must be shared; prefer page bundles
with `resources.Get` for new artwork. Flag images larger than ~300 KB.
- Email addresses in content must use the `obfuscate` shortcode:
`{{< obfuscate >}}name@example.com{{< /obfuscate >}}`.
- Do not commit `public/`, `resources/`, `.hugo_build.lock`, or editor droppings.
- Copy is **German**, first person, short and factual. No marketing filler.
- Keep the legal pages and the footer links to them; a German site needs both.
- Email addresses in content use `{{< obfuscate >}}name@example.com{{< /obfuscate >}}`.
- The site is a single home page: do not add menu entries or sections without
being asked. Taxonomies are disabled in `config.yml` for that reason.
- `title` in config and in `content/_index.md` must stay identical, otherwise
the RSS channel title becomes "X on Y".
## Guardrails
- **Never push to `master`** unless the user explicitly asks for a deploy.
A push to `master` builds and overwrites the live site.
- Do not touch `config.yml` secrets/analytics IDs, and never commit credentials.
CI secrets (`SSH_USERNAME`, `SSH_PASSWORD`, `SSH_PORT`, `TELEGRAM_TO`,
`TELEGRAM_TOKEN`) live in Gitea repository settings only.
- Deploy mirrors `public/` to the server with
`rsync -rltz --delete --delay-updates`, so deleting a post or image also
removes it from the live site on the next `master` push. Never place
hand-made files under `/var/www/poweronoff.click` — they will be deleted;
A push to `master` builds and replaces the live site.
- Do not touch secrets or analytics. Analytics is **off** (the old Universal
Analytics property is dead); do not enable a tracker without discussing
consent first. CI secrets (`SSH_USERNAME`, `SSH_PASSWORD`, `SSH_PORT`,
`TELEGRAM_TO`, `TELEGRAM_TOKEN`) live in Gitea repository settings only.
- Deploy mirrors `public/` with `rsync -rlptz --delete --delay-updates`, so
deleting a file also deletes it from the live site. Never place hand-made
files under `/var/www/poweronoff.click` — they will be removed;
`.well-known/` is excluded for ACME challenges.
- Deploy still authenticates with a password via `sshpass`. Moving to an SSH
key is a known follow-up.
- The build must be warning-free. Deprecations coming from the theme are fixed
by `make theme-update`, never by editing the submodule; deprecations coming
from `config.yml` (e.g. a retired analytics ID) are fixed in the config.
by `make theme-update`, never by editing the submodule; config deprecations
are fixed in `config.yml` (for example `locale`, not the retired
`languageCode`).
## Known issues / backlog
- Analytics is deliberately disabled: the Universal Analytics property is dead
and no GA4 measurement ID exists yet. Add `googleAnalytics: G-XXXXXXXXXX` in
`config.yml` if tracking is wanted (cookieless consent implications aside).
- `params.images` (Open Graph / Twitter cards) points at 32–60 px icons. Use a
1200×630 image so shared links render properly.
- Two posts (`a-letter-to-my-younger-self`, `appreciation`) are drafts whose
bodies are still placeholders. They are not published, but do not "clean
them up" without asking — they are the author's unfinished work.
- Builds are intentionally unpinned (`hugo:latest`). A Hugo release can change
output or deprecate theme code between two commits; when that happens, pin via
`HUGO_IMAGE` locally, then bump PaperMod with `make theme-update`.
- No Open Graph image: `params.images` was removed because it pointed at 32 px
icons. Add a 1200×630 asset in `static/` and set `params.images` if social
previews matter.
- `static/` still holds artwork from the old blog (four Unsplash covers,
`me.png`, ~5 MB) that the landing page does not reference. Delete once the
author confirms it is no longer needed.
- Impressum and Datenschutz disagree on the street address (Wilsnacker Str. 6
vs. 39). Needs the author's confirmation; do not guess.
- Deploy still uses password auth; switch to an SSH key and keep the rsync
`--delete` semantics.