Enhanced Backlinks with Thumbnails Using Media Viewer

I’ve been experimenting with ways to make backlinks more visually accessible. Since the Media Viewer plugin can display both images and note links, I’ve combined it with Dataview to create a card-based display of backlinks, complete with thumbnails. Here’s the effect:

Required Plugins:

```dataviewjs
const currentPage = dv.current();
const pages = dv.pages().where(p => p.file.outlinks.includes(currentPage.file.link));
let data = pages.map(page => [
	page.file.name,
	page.file.mtime
]).sort((a, b) => dv.date(b[1]) - dv.date(a[1]));
dv.span(`\`\`\`gallery\n
	title: Backlinks
	pagination: 4\n
	${data.map(row => `[[${row[0]}]]`).join("\n")}\n
	\`\`\``);
```

Explanation:

  • pagination: 4: This parameter controls how many note links are displayed per page.
3 Likes

On This Day:

```dataviewjs
const today = new Date();
let data = dv.pages()
	.where(p => {
		const pageDate = new Date(p.date);
		return pageDate.getMonth() === today.getMonth() && 
			   pageDate.getDate() === today.getDate();
	})
	.sort(p => p.file.mtime, 'desc')
	.map(p => p.file.name);
dv.span(`\`\`\`gallery\n
	title: On This Day\n
	pagination: 4\n
	${data.map(row => `[[${row}]]`).join("\n")}\n
	\`\`\``);
```