Files
website/README.md
T
yann64andClaude Opus 5.5 fda5359932 Add site search (Pagefind)
Client-side index generated after the Hugo build; search box in the
header, results page with a section filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
2026-10-11 20:31:00 +02:00

50 lines
2.6 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 |
| `content/_index.md`, `layouts/`, `assets/`, `hugo.toml`, `tools/` | written by hand |
| `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`. Write the text in Markdown and
remove `draft: true` to publish. The five most recent posts 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. Posts are never touched by
`make content`.
## 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 tabs are not. `hugo server` has no index: use `make build` and serve `build/`
to try the search locally.
## 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.