No description
Find a file
2026-06-24 22:07:23 -04:00
.github/workflows chore: plugin lint 2026-05-13 15:05:21 -04:00
src feat: GitHub issues client 2026-06-24 22:07:23 -04:00
.gitignore feat: add override support, command replacement stub 2025-10-26 12:57:10 -04:00
esbuild.config.mjs chore: plugin lint 2026-05-13 15:05:21 -04:00
eslint.config.mjs chore: add eslint 2025-12-04 09:31:25 -05:00
LICENSE Create LICENSE 2025-05-16 18:55:30 -04:00
manifest.json chore: 1.4.5 2026-05-13 15:05:37 -04:00
package-lock.json chore: 1.4.5 2026-05-13 15:05:37 -04:00
package.json chore: 1.4.5 2026-05-13 15:05:37 -04:00
README.md chore: readme 2025-11-12 12:37:22 -05:00
styles.css feat: replacement up/down arrows 2025-11-11 11:42:55 -05:00
tsconfig.json chore: 1.4.4 2026-05-12 16:08:44 -04:00
vitest.config.ts test: add test suite 2026-05-12 15:36:04 -04:00

Smart Link Formatter

A plugin for Obsidian that automatically formats pasted links with metadata.

It has explicit support for:

  • YouTube
  • Twitter/X
  • Reddit
  • YouTube Music
  • GitHub
  • Image links

Features

  • Automatically formats pasted links
  • Supports custom formatting for all clients, as well as regular links
  • Blacklist domains to prevent automatic formatting
  • Toggle auto-linking on/off

Formatting

Variables are replaced dynamically by the plugin. The first instance of square brackets [] will be a hyperlink for the clipboard content.

For default links, the following variables are available:

  • {title} - Page title
  • {url} - The URL of the page

Example format: [{title}]

If you need to format a date (e.g. upload_date), you can use moment.js date formats: {upload_date|MMMM Do, YYYY}

Capturing

Clients in the plugin have unique variables you can capture. For instance, when pasting a YouTube link, the following variables are available for formatting:

  • {title} - Video title
  • {channel} - Channel name
  • {uploader} - Uploader name (which can sometimes differ from channel)
  • {duration} - Length of the video
  • {views} - Number of views
  • {upload_date} - When the video was uploaded
  • {description} - Video description
  • {url} - The URL of the video
  • {timestamp} - For timestamped links (formats as @HH:MM:SS or @MM:SS)

Example format: [{title}] by {channel}

Other clients follow similar patterns, and their variables can be found in the plugin settings.

Replacements

Regex replacements are also available to do rules-based replacements on the formatted text. Useful examples:

  • Normalize spaces: \s{2,} -> ' '
  • Remove parenthetical text: \s*\([^)]+\) -> (empty)
  • Truncate after n chars (link only): (?<=(?<!\\)\[)(.{0,n}\S*?)\s.*?(?=(?<!\\)\]) -> $1...
  • Trim whitespaces: ^\s+|\s+$ -> (empty)