Files
yann64andClaude Opus 5.5 7d3b1bec89 Look: Terminal theme (panr/hugo-theme-terminal v4.2.6), adapted to the museum
Theme vendored unmodified in themes/terminal; base, head, header, footer and post templates
rewritten in its markup; museum components restyled in assets/css/museum.css. Embedded forum
threads follow the same colours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
2026-10-13 19:03:12 +02:00

66 lines
3.9 KiB
Markdown

# old-computers.com — static site
Static rebuild of old-computers.com with [Hugo](https://gohugo.io/) (0.158 or newer, tested with
0.167). The content is recovered from the Wayback Machine by the extraction repository
(`../oc`), which generates part of this one.
| Path | Origin |
|---|---|
| `content/{museum,machine-tabs,companies,software,history,magazine,fun}/` | generated, replaced on every `make content` |
| `static/media/` | generated (copied images and documents) |
| `data/slugs.json` | generated, keeps URLs stable between runs — do not delete |
| `content/post/` | written by hand: news posts, see below |
| `data/forum.json`, `data/forum_pages.json` | machine → forum thread and news post → forum thread maps, written by the forum import and by `make forum-sync` |
| `forum/` | forum extension, local test stack, install notes |
| `content/_index.md`, `layouts/`, `assets/`, `hugo.toml`, `tools/` | written by hand |
| `themes/terminal/` | the [Terminal](https://github.com/panr/hugo-theme-terminal) theme (MIT), unmodified copy of v4.2.6; adapted by the project's `layouts/` (base, head, header, footer, posts) and `assets/css/museum.css`; palette in `assets/css/terminal.css` if overridden |
| `build/`, `public/` | build output (`make build`, `hugo server`), not versioned |
Content pages are Markdown with YAML front matter and can be corrected by hand, but a later
`make content` overwrites them: lasting fixes belong in the extraction repository.
## Posts
make post NAME=my-title
creates `content/post/<today>-my-title.md` (any `.md` file in `content/post/` is a post). The
date comes from the file name unless `date:` is set; `author:` is optional; the name
links to `/author/<name>/`, which lists all posts by that author. For a banner, put an
image under `static/media/` and set `banner: /media/....jpg` (`image:` works too). Write the text in Markdown and
remove `draft: true` to publish. The most recent posts (`homePosts` in `hugo.toml`, 5 by default) appear on the home page with their
banner, date, author and summary (`summary:` in the front matter, or the text before
`<!--more-->`, or the first lines); all posts are listed under News and on each
author's page, `listPosts` per page (20 by default). Posts are never touched by
`make content`.
With a forum, each published post gets a comment discussion, shown under the post. The
discussion is created by `make forum-sync`, which `make deploy` runs first: it lists the posts,
has the forum create the missing discussions and records them in `data/forum_pages.json`.
## Search
Search runs in the visitor's browser on an index generated by [Pagefind](https://pagefind.app/)
at the end of `make build` (fetched by `npx`, so Node.js is needed to build). The header box
sends to `/search/`, where results can be filtered by section. Content pages are indexed
(`data-pagefind-body` on `<main>` in `layouts/baseof.html`); lists, taxonomy pages and the
visitor comments are not. `hugo server` has no index: use `make build` and serve `build/`
to try the search locally.
## Forum and comments
A [Flarum](https://flarum.org/) forum can run next to the site and serve as its comment system:
with `params.forum.url` set in `hugo.toml`, the menu gets a Forum entry and every page of a
machine ends with that machine's forum thread (archived comments first, new replies after).
With the url empty the site has no forum and shows the archived comments as static text.
Everything about the forum is in [`forum/README.md`](forum/README.md).
## Usage
make content # regenerate from ../oc (OC=path to use another location)
make build # build into build/, with the search index
make check # build + verify every internal link and image
make serve # preview on http://localhost:1313
make deploy # build and copy to the test server (share must be mounted; see DEPLOY_DIR/DEPLOY_URL)
The site uses relative URLs, so `public/` can be served from any directory of a web server.