Links: post:<id> references resolved at publish

Aperta
#3 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
markdown, sqlite
Ambito
backend, content

Direzione di ricerca

Start with renderSvx and syncSiteText, which the issue names as the places that rewrite post:<id> hrefs and compare site .svx bodies to the published revision. The id-to-slug lookup comes from posts.id in SQLite. Done when the five checks (live, draft, deleted, rename between publishes, no-post:-link byte-identical output) pass and a publish never writes a post: href. This depends on the link-lint issue, so confirm that lands first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Context

Links by slug break on rename and say nothing about draft status. Every post already has a permanent 6-character id (posts.id). Design notes: a post:<id> link written in the editor, resolved to /<slug> when the .svx is rendered.

Scope

  • renderSvx takes the live id-to-slug map and rewrites post:<id> hrefs. A target that is not live (draft, unpublished, deleted) loses its href and keeps its text, with a warning in the Publish view naming the link.
  • syncSiteText must compare a site .svx body against the rendered form of the published revision, otherwise every publish looks like an external edit.
  • Unlinked references heal on the next publish once the target goes live.

Acceptance criteria

  • Checks cover: live target, draft target, deleted target, rename between two publishes, and a body without post: links (byte-identical output).
  • After a publish, no post shows as changed because of link rewriting.
  • A post: href never reaches a written .svx; if one would, the publish is blocked.

Depends on the link-lint issue. Estimate: about 5 hours.

Lingua principale
HTML
Stelle
0
Fork
0
Merge medio
1m
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mrgnw/cfcms

Tutte le issue di mrgnw/cfcms

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.