mirror of
https://github.com/RyanGreenup/cadmus.git
synced 2025-08-02 12:21:18 +02:00
How to Back Links
This commit is contained in:
42
docs/tools/BackLinks.md
Normal file
42
docs/tools/BackLinks.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Back Links
|
||||
---
|
||||
|
||||
# Display Back Links
|
||||
!!! note
|
||||
Start this with `cadmus tools backlinks`
|
||||
|
||||
## What does it do
|
||||
|
||||
This takes a notes path from the clipboard and displays in the terminal any files that link to it using either:
|
||||
|
||||
- `[markdown](./links.md)`
|
||||
- `[[wiki-links]]`
|
||||
|
||||
## How Do I use it
|
||||
|
||||
Copy a note path to the clipboard then run `cadmus tools backlinks`, any notes that link to it will be displayed in the terminal.
|
||||
|
||||
## When Would This Be Used
|
||||
|
||||
This is handy when you have some piece of code, somewhere, that you can't find but you're sure you linked to.
|
||||
|
||||
### Example
|
||||
|
||||

|
||||
|
||||
## How does it Work
|
||||
|
||||
This is just more `ripgrep`:
|
||||
|
||||
```bash
|
||||
rg -e "\[.*\]\(.*$term\.md\)" -e "\[\[$term\]\]" -e "\[\[$term.*\]\]" \
|
||||
~/Notes/MD/notes \
|
||||
-t markdown -ol
|
||||
```
|
||||
|
||||
!!! note
|
||||
See the script in `/bin/tools/List-Backlinks.sh`
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user