DLink 让本地磁盘文件(大体积视频、音频、工程资料等)与 Obsidian 笔记双向关联,并支持内联预览与播放。
核心功能
双轨文件浏览器:内库 / 外部路径一键切换,支持搜索与类型筛选
拖拽成链:从系统资源管理器拖入编辑器,自动生成链接
三种链接格式:local-file://(推荐)/ file:/// / 绝对路径
内联预览:图片、视频、音频在阅读模式下直接渲染,链接悬浮显示卡片预览
分栏组图:duallink-gallery 代码块生成瀑布流画廊,列数可调、支持拖拽排序与双击放大
DualIn / DualOut:外部资源一键入库、库内媒体一键外置,含被引用保护、冲突重命名与链接修复
安装:设置 → 第三方插件 → 浏览 → 搜索 DLink 安装启用;或从 Releases 下载三个文件放入 .obsidian/plugins/dlink/。
使用
Ctrl/Cmd 多选媒体文件,点击 Insert N images (N columns) 生成画廊DualIn / DualOut 完成文件进出库Link, preview and manage files that live outside your vault — large videos, lossless audio, engineering assets, network drives — right inside Obsidian notes.
Dual-mode file browser — switch between vault and external paths in one click, with search and type filters (all / image / video / audio / document).
Drag & drop linking — drag files from your system file manager into the editor to generate a link instantly.
Three link formats — local-file:// (recommended, bypasses CSP), file:/// (cross-tool compatible), or raw absolute path.
Inline preview & playback — images, videos and audio render directly in reading view; hover a link for a card preview.
Gallery — the duallink-gallery code block builds a waterfall gallery with adjustable columns, drag-to-reorder, double-click zoom and audio support.
DualIn / DualOut — copy externally referenced files into the vault (DualIn), or move vault media out to an archive directory (DualOut). Referenced attachments are protected, name conflicts are resolved automatically, and broken links can be repaired.
Community plugins: Settings → Community plugins → Browse → search DLink → Install → Enable.
Manual: download main.js, styles.css and manifest.json from Releases into .obsidian/plugins/dlink/, then enable the plugin.
Ctrl/Cmd and click multiple media files, then Insert N images (N columns) to create a gallery.DualIn / DualOut from the command palette, editor context menu or ribbon to move files in and out of the vault.const api = this.app.plugins.getPlugin('dlink').api;
| Method | Description |
|---|---|
generateMarkdownLink(name, path) |
Build a link using the current settings |
packToVault() |
Open the "pack to vault" modal |
packOut() |
Open the "pack out" modal |
findExternalFileRec(name, dir, maxDepth?) |
Recursively find a file, returns its full path or null |
npm install
npm run dev # watch mode
npm run build # production build
MIT