A timeline's own image: settings, cards, previews and oEmbed (#339)
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
A timeline can have an image of its own: a link to where it is hosted (docs/images.md) with alt text, and its size when the settings measured it. It is one of the document's settings, like its tags (`image` in .ochx), so saved history, exports, forks, copies, merges and pull requests keep it. - Core: validateTimelineImage (src/timeline-image.ts), HTTPS links without credentials only; documents and the editor's index carry it. - Server: oc_timelines.image, written by saves and rebuilds, copied to forks, in history settings, merges, retention's saves and the catalogue's cards. PATCH /api/timelines/:id/settings takes {image} (null removes it) and saves the settings as a revision of their own; a comparison has none. - Web: an Image section in Sharing & settings (preview, link, alt text, set, replace, remove); the image at the top of each card (16:9, lazy, a placeholder without one or for a labelled timeline); above the title in the editor and the reader (blurred on labelled timelines, carried by Export). - Previews: the timeline page's og:image and twitter:image, and oEmbed's thumbnail when its size is known; labelled or private timelines keep the drawn preview. - OpenAPI, docs (images, sharing, collaboration, architecture) and tests: timeline-image.test.mjs, timeline-image-postgres.mjs (in CI) and the settings, card, heading and preview checks in sharing-postgres.mjs. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/b82888fa05e608e58d40cbd395530d14b62820d5
Related
Open A timeline's own image: settings, cards, previews and oEmbed (#339) in the timeline