compute note backlinks

This commit is contained in:
Julien Calixte
2021-06-06 09:57:17 +02:00
parent 203db4c00a
commit 4f13c18573
11 changed files with 122 additions and 24 deletions

4
src/utils/link.ts Normal file
View File

@@ -0,0 +1,4 @@
export const LINKS = ['http://', 'https://']
export const isExternalLink = (href: string) =>
LINKS.some((link) => href.startsWith(link))

2
src/utils/noteTitle.ts Normal file
View File

@@ -0,0 +1,2 @@
export const filenameToNoteTitle = (title: string) =>
title.replaceAll('/', ' / ')