Skip to content

behavior: markdown @mention + external-link transforms #81

@themightychris

Description

@themightychris

Gap

specs/behaviors/markdown-rendering.md requires two transforms in the server-side markdown pipeline. Neither is implemented:

  1. @mention resolution@<slug> in markdown body → link to /members/<slug>. Falls back to plain text if the slug doesn't resolve to a Person.
  2. External-link transform — links to a different host than the rendering page get target="_blank" rel="noopener nofollow". Internal links don't.

Scope

  • Both transforms in packages/shared/src/markdown/ (or wherever the server-side renderer lives — pipeline is currently in @cfp/shared)
  • Spec-conformance tests in packages/shared/tests/markdown.test.ts
  • @mention resolution needs the in-memory people.bySlug map — wired via the renderer's context or a callback
  • Render-time validation: don't transform @-prefixed tokens inside code blocks or inside link text

Why this matters at cutover

Project descriptions, project updates, bios, blog posts (#H), buzz summaries — every long-form text field ships through this pipeline. Mentions and external links not working makes the cutover-served content feel half-finished.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions