Skip to content

kangruixiang/note-link-janitor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

note-link-janitor

This script is a fork from Andy Matuschak's original script.

It reads in a folder of Markdown files, notes all the [[wiki-style links]] between them, then adds a special "Links to This Note" section which lists passages which reference a given file.

For example, this text might get added to Sample note.md:

## Links to This Note
* [[Something that links here]]
    * The block of text in the referencing note which contains the link to [[Sample note]].
    * Another block in that same note which links to [[Sample note]].
* [[A different note that links here]]
    * This is a paragraph from another note which links to [[Sample note]].

The script is idempotent; on subsequent runs, it will update that backlinks section in-place.

Changes

  • Updated most packages to latest version. Importantly, remark has been updated from 11 to 15.
  • Ensures note content has new line and that there's a new line before the backlinks section
  • Index.ts was refractored into different functions for readability
  • removed the comments <!-- function since it was breaking some of my notes with comments
  • types are consolidated to types.ts

About

Maintains backlink structure among interlinked Markdown notes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 75.6%
  • JavaScript 24.4%