You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lychee provides a built-in `WikilinkResolver` to check Wikilinks in Markdown Files. This `WikilinkResolver` indexes all files in a given directory (incl. available subdirectories) by their filenames.
8
+
Symlinks are ignored during this procedure.
9
+
It then tries to resolve the extracted Wikilinks by looking up the Wikilink in the created index.
10
+
11
+
Both Extraction and Resolving are **deactivated by default**.
12
+
13
+
For checking Wikilinks please specify the following CLI Flags:
14
+
15
+
-`--include-wikilinks` to enable the extraction of Wikilinks
16
+
-`--base-url /path/to/your/directory` where the `WikilinkResolver` should start indexing
17
+
-`--fallback-extensions`, e.g. `--fallback-extensions md, mdx`
18
+
19
+
:::note[Good to know]
20
+
Because Wikilinks do not include a file extension, lychee needs you to specify the extensions you are using with `--fallback-extensions`
21
+
:::
22
+
23
+
Summed up the following command might be a good starting point to check for the existance of files used by Wikilinks:
24
+
25
+
```bash
26
+
lychee --include-wikilinks \
27
+
--base-url /path/to/your/local/directory \
28
+
--fallback-extensions md,mdx .
29
+
```
30
+
31
+
## Link Renaming
32
+
33
+
Some tools provide a possibility to rename Wikilinks by specifying the alternative title after a so-called pothole: `|`. Lets have a look at an example:
34
+
35
+
```Markdown
36
+
[[Filename|Alternative Title]]
37
+
[[Filename|Another Alternative Title]]
38
+
```
39
+
40
+
Both Wikilinks will be displayed with their alternative titles but link to the same file.
41
+
Lychee tries to resolve these Links by stripping away the alternative title and resolving by the remaining Filename only.
0 commit comments