Obsidian Metadata Links is a plugin for Obsidian that fetches metadata (title, description, image, icon) for the URLs in your selection and stores it as a metadata-links code block, which is then rendered as a card in Reading view and Live Preview.
metadata-links code blocks holding their fetched metadata.Card (image, title, description, URL) and Compact (single-line title linking to the URL). Pick the template per-conversion from the editor context menu, or set a default used by the command palette.metadata-links code blocks in a selection back into plain URLs.metadata-links code blockConverting a URL inserts a block like this into your note:
```metadata-links
template: card
title: Example Site
description: This is a description
image: https://example.com/img.png
icon: https://example.com/favicon.ico
url: https://example.com
```
The plugin renders this block into the corresponding template. Editing the fields by hand and switching the template value re-renders it with a different template.
Clone the Repository:
Clone this repository into the plugins folder of your Obsidian vault.
git clone https://github.com/ansango/obsidian-metadata-links.git
Build the Plugin: Navigate to the cloned repository directory and run the build command.
cd obsidian-metadata-links
bun install
bun run build
Enable the Plugin:
Open Obsidian and go to Settings > Community plugins. You should see "Metadata Links" in the list. Enable it to start using the plugin.
Convert a selection: Highlight one or more URLs in a note, right-click and choose "Convert selection to metadata link" with the template you want, or run "Convert selection (Card/Compact)" from the command palette.
Undo a conversion:
Select the metadata-links code block(s) you want to revert, then use "Undo metadata links in selection" from the context menu or the "Undo selection" command.
Choose a template per link:
If a page doesn't expose much metadata (no image/description), pick the Compact template instead of Card from the context menu.
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or support, please open an issue in the repository.