Wikilinks: [[note]] links and backlinks in Markdown
A wikilink is a link written as a note's title inside double square brackets, like [[Project plan]]. In MiaoYan, typing [[ brings up live completion for matching note titles, linking to the note whose file name matches that title, and the linked note lists incoming references as clickable backlinks. Renaming a note inside MiaoYan automatically rewrites incoming wikilinks across the library. [[Title|shown text]] customizes the displayed label and [[Title#Heading]] jumps to a heading inside the note, while block references and embeds are not supported.
Wikilinks versus normal Markdown links
A standard Markdown link carries a text label and a destination: [Project plan](Projects/Project%20plan.md). The destination is a path, so it breaks when you move the file, and spaces have to be URL encoded. Every Markdown renderer understands it.
A wikilink drops the path and the label: [[Project plan]]. You name the note and the app finds it. Obsidian, which popularized the style, describes the same split in its documentation: wikilinks use double brackets and are generated by default because they are more compact, while Markdown links need URL encoding and can be switched on by disabling "Use [[Wikilinks]]".
| Normal Markdown link | Wikilink | |
|---|---|---|
| Syntax | [text](path.md) |
[[Note title]] |
| Points to | A path | A title |
| Works in any Markdown viewer | Yes | No, the app must support it |
| Survives moving the file | No, the path changes | Yes, if the title stays |
| Survives renaming the file | Only if the path is updated | Yes, when renamed inside MiaoYan |
| Custom link text | [text](...) |
[[Note title|text]] |
Portability is the real cost. Open the same folder in a viewer that does not know wikilinks and [[Project plan]] shows up as literal text. If you publish notes to GitHub or a static site, expect to convert them.
How to write them in MiaoYan
Write the note title between double brackets, without the .md extension:
See [[Project plan]] for next steps, and [[Meeting notes 2026-10]] for context.
The title is the file name without its extension, so Project plan.md is [[Project plan]]. The match is case-sensitive and exact, so extra characters break the link. MiaoYan's agent skill makes the same point: keep the target aligned with the note title and do not invent alias, heading or block-reference syntax.
Obsidian documents [[Example|Custom name]] for display text, [[Note#Heading]] for headings and #^block-id for blocks. MiaoYan supports the first two forms: [[Project plan|plan]] shows "plan" in the preview, opens Project plan, and counts as a backlink for Project plan, while [[Project plan#Budget]] opens Project plan and jumps to the Budget heading. Block references (#^block-id) and embeds (![[Note]]) are not implemented.
How MiaoYan implements them
Here is how it works, based on the source.
Pattern matching. The editor and the index both look for [[ followed by text and ]]. The editor highlights the title as a link while you write. The index uses a separate pattern that takes any run of characters that is not a closing bracket, keeps the part before the first |, trims surrounding spaces, and treats the result as the target title.
The index. At launch, MiaoYan builds the index from every note file under the library folders, reading from disk the notes whose text is not loaded, and records for each title the set of titles it links to (outgoing links) and the set of titles that link to it (incoming links). Saving a note updates its entry in the index.
Clicking a link. A wikilink becomes a miaoyan://goto/<title> address, the same URL scheme the miao open command uses. MiaoYan looks for a note with exactly that title. One match opens it. No match shows "No note has this title" and creates nothing. Several matches, for example two folders that each contain Meeting notes.md, start a search for that title and show "Several notes share this title. Showing search results". So unique titles are not just tidy, they are what makes a link unambiguous.
Preview and export. For the rendered preview, MiaoYan rewrites each wikilink into an ordinary Markdown link of the form [Title](miaoyan://goto/Title) before rendering, with the text after a | as the link text, and skips anything inside code spans and fenced code blocks, so an [[example]] in a code sample stays as text. The export path uses the same preparation, which means an exported file contains miaoyan:// links that only work on a Mac with MiaoYan installed.
Copy URL. The "Copy URL" command places this same address on the clipboard, so you can paste a link to a note into another app.
Backlinks
Backlinks show which notes link to the current note. MiaoYan displays them in the document info popover, opened with Command Option I (or Note Info on iPhone and iPad), alongside four live statistics (words, characters, paragraphs and estimated reading time) and the created and modified dates.
Clicking any backlink title in the popover opens that note directly.
What goes wrong and how to check
- A link opens the wrong note or starts a search. Two notes share a title. Rename one, since MiaoYan uses the file name as the identity.
- "No note has this title". The target does not match any file name exactly. Check case, spaces and punctuation, and remember that
Project plan.mdisProject plan. - You renamed a file in Finder instead of inside MiaoYan. Renaming inside MiaoYan rewrites incoming
[[Old Title]]links automatically, whereas renaming on disk outside the app leaves old text untouched until updated. - Backlinks look incomplete. The index covers every note file in the library, so a missing backlink usually means the title inside the link does not match the note's title exactly. Check case, spaces and punctuation.
- A link written for another app shows as text. Block references and embeds such as
![[image.png]]are Obsidian syntax and MiaoYan does not support them. Convert them to plain titles or standard Markdown.
When to use plain links instead
Use standard Markdown links when the notes will be read outside MiaoYan, such as a GitHub repository, a static site or a README. Use wikilinks for a personal knowledge base that lives in one app, where short titles make linking fast. Mixing both is fine, since MiaoYan renders both.
Related reading: Local-first Markdown notes covers title-as-filename and folder structure, Markdown notes from the terminal shows miao open with titles, and an Obsidian alternative for Mac lists what carries over from a vault.
MiaoYan for Mac is open source on GitHub, and the App Store version covers Mac, iPhone and iPad.
FAQ
Do MiaoYan wikilinks need the .md extension?
No. Use the title only, such as [[Project plan]].
Does MiaoYan support [[Note|alias]] or [[Note#Heading]]?
Yes to both: [[Note|alias]] links to Note and displays alias, and [[Note#Heading]] opens Note at that heading. Block references (#^id) and embeds (![[Note]]) are not supported.
Do wikilinks work in code blocks?
They are left as plain text inside code spans and fenced code blocks.
Is there a graph view?
No. The Mac app does not include a graph view. Backlinks appear as a list in the document properties panel.
