URL Enricher

by mattmarotta
5
4
3
2
1
Score: 49/100

Description

Non-destructive link preview and enrichment for your Obsidian notes vault. Automatically displays rich metadata previews for URLs - shows page titles, descriptions, and favicons inline without modifying your markdown source.

Reviews

No reviews yet.

Stats

7
stars
413
downloads
0
forks
97
days
1
days
1
days
4
total PRs
0
open PRs
0
closed PRs
4
merged PRs
1
total issues
0
open issues
1
closed issues
134
commits

Latest Version

a day ago

Changelog

Added

  • Declarative settings API (getSettingDefinitions()), so plugin settings now appear in Obsidian's built-in settings search on 1.13+
  • Build provenance attestation for release assets
  • End-to-end decorator tests that mount a real CodeMirror editor, covering decoration precedence, staggered metadata loading, and card/inline rendering

Changed

  • Raised minAppVersion to 1.13.0. The settings tab now uses the declarative API exclusively. Users on older Obsidian versions keep receiving 1.3.2 via versions.json rather than breaking
  • Reddit metadata is fetched from old.reddit.com; the original URL is still what gets cached, displayed, and opened on click
  • DOM creation and timers use Obsidian's popout-window-safe APIs (createEl/createDiv/createSpan, activeDocument, window.setTimeout)
  • Metadata refreshes are coalesced into a single repaint instead of one full-document rescan per URL
  • Rebuilt the ESLint config so the eslint-plugin-obsidianmd preset applies correctly, and enabled prefer-active-doc
  • Updated obsidian typings 1.10.0 → 1.13.1 and refreshed dependencies
  • Reduced !important in styles.css from 64 to 15 and dropped rules for classes the plugin no longer renders
  • Releases publish only main.js, manifest.json, and styles.css — no

ZIP archive

Fixed

  • Previews never appeared for [text](url) and [[url]] links. Obsidian's Live Preview owns replace decorations over those ranges and loads before plugin extensions, so the plugin's decorations were discarded. They are now registered at highest precedence and render immediately instead of only after moving the caret or reopening the note
  • A link never started loading while the caret sat inside it. The metadata fetch was skipped along with the rendering, so a just-pasted link stayed blank until the caret moved away
  • Card previews dropped the title entirely for sites without a favicon
  • Reddit previews only ever showed "Reddit". reddit.com serves a JavaScript bot-challenge page to non-browser clients, and its .json API returns 403; both subreddit and post links now resolve real titles and descriptions
  • Duplicate CSS selectors, an invalid :has(:contains()) rule that never matched anything, and an all: unset override
  • Type-safety issues around loadData(), JSON.parse, Map iteration, and a regex callback
  • Stale eslint-disable directives that no longer suppressed anything

Removed

  • The deprecated display() settings fallback, superseded by getSettingDefinitions()
  • builtin-modules dependency, replaced with Node's built-in node:module

Security

  • Resolved 18 dependency vulnerabilities (3 critical, 12 high, 3 moderate), all in devDependencies

Full Changelog: https://github.com/mattmarotta/obsidian-url-enricher/compare/1.3.2...1.4.0

README file from

Github

URL Enricher

GitHub release

License

Non-destructive link previews for Obsidian.

URL Enricher shows the title, description, and favicon for URLs in your notes without changing the markdown underneath. The source file keeps the plain URL; only the rendered view changes.

inline demo

card demo

Requirements

  • Obsidian 1.13.0 or later
  • Live Preview mode. The plugin does not render in Source mode or Reading view.

Quick start

Install the plugin, then open a note in Live Preview and paste a URL. Previews appear once the page metadata loads.

Global settings live under Settings > URL Enricher. Any note can override them with frontmatter, which must start on line 1:

---
preview-style: card                   # inline | card
max-card-length: 400                  # 1-5000 (recommended: 100+)
max-inline-length: 200                # 1-5000 (recommended: 50+)
show-favicon: true                    # true | false
include-description: true             # true | false
inline-color-mode: subtle             # none | subtle
card-color-mode: subtle               # none | subtle
---

Preview styles

Inline (compact)

Inline Preview

Flows with the surrounding text and hides the raw URL. Best for reading.

Card (detailed)

Card Preview

A block layout showing the description and site name. Best for bookmarks and research notes.

What it does

  • Never modifies your markdown source
  • Reveals the raw URL while the cursor is inside it, so you can still edit
  • Fetches title, description, and favicon automatically
  • Accepts per-note overrides through frontmatter
  • Applies site-specific handling for Wikipedia, Reddit, Twitter/X, LinkedIn, and Google Search
  • Applies settings changes immediately, with no reload

Customization

To set your own preview colors, use an Obsidian CSS snippet.

  1. Go to Settings > Appearance > CSS snippets and click the folder icon.
  2. Create url-enricher-colors.css:
/* Inline preview background */
.url-preview--inline {
  background: #4a90e2 !important;
}

/* Card preview background */
.url-preview--card {
  background: #50c878 !important;
}
  1. Return to Settings > Appearance > CSS snippets and enable it.

Supported URL formats

https://github.com                            # Bare URL
[custom text](https://github.com)             # Markdown link
[](https://github.com)                        # Empty link text
[[https://github.com]]                        # Wikilink (URLs only)

Not supported: image embeds ![](https://raw.githubusercontent.com/mattmarotta/obsidian-url-enricher/HEAD/url), URLs inside code blocks, and non-HTTP protocols.

Common issues

Previews not showing

  • Confirm the note is in Live Preview mode, not Source mode.
  • Confirm the URL includes the scheme, for example https://example.com.
  • Try Settings > URL Enricher > Clear cache.

Frontmatter not applying

  • The block must start on line 1 with ---.
  • Check the key spelling, for example preview-style rather than previewstyle.

Stale or incorrect previews

  • Use Settings > URL Enricher > Clear cache.

Slow performance

  • Turn off descriptions, or reduce the maximum description length, in Settings.

Warning icon next to a URL

Some sites block automated requests and return an HTTP error. To hide these warnings, set Settings > URL Enricher > HTTP error warnings to off.

For anything else, see TROUBLESHOOTING.md.

Site-specific handling

Some sites need extra work to produce a useful preview:

  • Wikipedia: fetches the article introduction and reports Wikipedia as the site name.
  • Reddit: fetches through old.reddit.com, because the main site serves a bot challenge page instead of metadata to non-browser clients.
  • Twitter/X: fetches tweet content through the public oEmbed endpoint.
  • Google Search: extracts the search query for the title.
  • LinkedIn: strips leading hashtags and comment counts from titles.

Privacy and network usage

The plugin makes network requests to build previews:

  • Page metadata: fetches HTML from the URLs in your notes to read titles, descriptions, and favicons.
  • Wikipedia API: queries article summaries for Wikipedia links.
  • Twitter oEmbed API: fetches tweet content for Twitter/X links.
  • Google favicon service: requests higher-resolution favicons for display.

It does not collect telemetry, analytics, or any user data. Requests are only made for public pages you have linked to, results are cached locally in your vault's plugin folder, and you control which URLs are processed.

Development

npm install                 # Install dependencies
npm run dev                 # Watch mode
npm run build               # Production build
npm run lint                # Run ESLint (enforces Obsidian plugin guidelines)
npm test                    # Run the test suite

See CONTRIBUTING.md for the full development guide, including the release process.

Contributing

Contributions are welcome. CONTRIBUTING.md covers development setup, code standards, the release checklist, and common pitfalls.

License

MIT. See LICENSE.