Publish: lint internal links that point at non-live posts
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- markdown, sqlite, typescript
Línea de trabajo
Start in buildLiveSet in src/lib/server/publish.ts, where the publish pass already has the live slug set when it renders post bodies. The new pure function findLinkProblems(body, liveSlugs) belongs in its own module with a *.check.ts file covering the listed link cases. Done means the check passes for every case, warnings appear per post in the Publish view, editor-route links disable the Publish button with a reason, and the rendered .svx text is unchanged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
Posts link to each other by hand with a root-relative slug (/gear). Nothing checks that the target is a live post, so links to drafts, renamed posts and pasted titles ship broken. Publish already knows the full live set when it renders post bodies (buildLiveSet in src/lib/server/publish.ts).
Scope
In the publish pass, scan each live body for links and report:
- root-relative hrefs whose first segment is not a live slug: a warning per link, shown in the Publish view;
- hrefs that contain the editor's own origin or start with
/posts/(an editor route, not a site route): block the publish.
Acceptance criteria
- A pure function
findLinkProblems(body, liveSlugs)in its own module with a*.check.tscovering: live slug, unknown slug, renamed slug, editor-route href, external link, anchor-only link, and a title pasted as a path. - The Publish view lists warnings per post; editor-route links disable the Publish button with the reason.
- No change to the rendered
.svxtext.
Estimate: about 3 hours.
- Lenguaje dominante
- HTML
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 1 min
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de mrgnw/cfcms
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Todos los issues de mrgnw/cfcms
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
G-nn-r/lg_heatpump#52 ·
-
grep: unknown parameter file_path is silently dropped, so the search runs over the whole cwdAbiertoarea: core bug priority: high
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
griffinwork40/agent-afk#4872 ·
Los mantenedores suelen responder en 1 día
-
fleet size/m
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
sipyourdrink-ltd/bernstein#7517 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
BUG-MERGE-TO-HDR-RESULT-NAMEPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
storytold/photocraft#14025 ·
Los mantenedores suelen responder en 1 día