A linter whose goal is to lint wikilinks in a variety of markdown note taking apps to enable maximal networked thinking.
Uses miette for beautiful 🦀 rust style error messages. 🦀
Uses git pre-commit to integrate with your git workflow.
- repo: https://github.com/ryanpeach/mdlinker
rev: <VERSION>
hooks:
- id: mdlinker
NOTE: Linking works best when you spell things correctly, in both your filenames and file contents. Consider pairing this tool with a spell checker.
Put a mdlinker.toml
in your project root to configure the linter.
Options are defined in src/config/file.rs
as a serde object, and can be overwritten in the cli, see mdlinker --help
.
- Similar Files: Two files share a very similar title. Maybe you should combine them! Uses a fuzzy finder and ngram similarity. O(n^2) complexity in the number of files.
- Duplicate Alias: If using something like logseq aliases, make sure they are always unique (also compares them to filenames).
- Broken Wikilink: Some wikilinks linked resource does not exist. Maybe you should create the page, or maybe the link title is misspelled?
- Unlinked Text: Text was detected which is very similar to some file title or alias. Maybe you should wrap it as a link?
- RelatesTo: At least in logseq, I find it annoying the graph wont show two items as linked if they are linked within the same block. These will identify that and force you to link them in the frontmatter.
- RelatesToParagraph: Two wikilinks in the same paragraph
- RelatesToListItem: Two wikilinks in the same list item
- RelatesToListItemDescendant: One wikilink in a sublist item of another wikilinks listitem
- RelatesToNotFound: delete a relation which doesnt match any of the above for cleanliness
- LSP Implementation
- Logseq Plugin
- Logseq Folder Structure
- Logseq Hierarchy
- Yaml Front Matter
- Logseq Aliases (in Yaml Front Matter)
-
[[url]]
and[[title|url]]
style wikilinks - #[[url]] and #url tags
- Marksman [[#url]] tags
- Logseq properties ":: style" (Won't implement, use yaml front matter)
- Obsidian Folder Structure (Unknown, PRs welcome)
- Obsidian Aliases (Unknown, PRs welcome)
- Marksman