dwmkerr / dwmkerr/effective-shell

feat: make code block titles clickable links

Open
#399 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
780
Forks
93
Avg merge
1d 7h
Merged PRs (30d)
3

Description

## 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:
```bash title="https://github.com/dwmkerr/dotfiles/blob/main/shell.functions.d/sourceenv.sh"
```

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 `` component

## Context

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.