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
- Swizzle the CodeBlock component - customize how titles render, detect URLs and make them links
- 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.
Summary
When using code blocks with a
titleattribute 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
<LinkedCodeBlock>componentContext
Came up when creating the
sourceenvsnippet page - wanted to link to the source file in dotfiles.