Skip to content

feat: make code block titles clickable links #399

Description

@dwmkerr

Summary

When using code blocks with a title attribute that contains a URL, it would be nice if the title was rendered as a clickable link.

Currently:

The title shows as plain text, but ideally it would be a clickable link to the source file.

Options

  1. Swizzle the CodeBlock component - customize how titles render, detect URLs and make them links
  2. Custom wrapper component - create a <LinkedCodeBlock> component

Context

Came up when creating the sourceenv snippet page - wanted to link to the source file in dotfiles.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions