中文文档:README.zh.md
Deck To Anki is an Obsidian community plugin that turns notes into Anki decks via AnkiConnect. Write cards in Obsidian (heading trees, lists, single-file cards, or filename-as-front), preview and select them in the sync panel, then push, update, or delete notes in Anki. Optional backlinks jump back to the source note, heading, or block.
head / list / card / title / fileob-deck-basic++ for flipped review[[note]] and ![[media]] supportRequirements: Obsidian ≥ 1.7.2, Anki + AnkiConnect.

http://127.0.0.1:8765)Suggested AnkiConnect config:
{
"apiKey": null,
"apiLogPath": null,
"ignoreOriginList": [],
"webBindAddress": "127.0.0.1",
"webBindPort": 8765,
"webCorsOriginList": [
"http://localhost",
"app://obsidian.md"
]
}
Preview parsed cards, select what to sync, check differences against Anki, then run Update / Force. You can copy examples/Deck-To-Anki-演示.md into your vault for a quick trial.
Open the panel from the ribbon or the Deck To Anki command.

deckType inside the configured scan scopeCheck-related options live under Settings → Sync → Check.
| Status | Color | Meaning |
|---|---|---|
| Synced | 🟩 green | Matches Anki |
| Modified | 🟥 red | Local differs from Anki |
| Unsynced | 🟨 yellow | Not yet pushed to Anki |
| Anki only | 🟦 blue | Present in Anki, missing locally |
| empty | 🩵 cyan | Empty back (unchecked by default after parse) |
| Unchecked | 🩶 gray | Not compared with Anki yet |

Use the Deck View button on a card row to preview the rendered card.

| Mode | Description | Note id location |
|---|---|---|
| Head (default) | Heading at the configured level is the front; body is the back. A lone --- line can split front/back further. |
<!--ID: n--> |
| List | Top-level list item is the front; indented content is the back (one indent level removed). | Trailing ^deckID on the list line |
| Card | After YAML, a lone --- splits front/back; one card per note. |
YAML deckID |
| Title | Filename is the front; body after YAML is the back; one card per note. | YAML deckID |
| File | Parent note organizes child notes via wiki links; children parse as head/list/card/title. | Depends on child mode |
File mode is for chapter-style decks. Nested File mode is not supported (a child note cannot itself use File mode):

Deck settings are stored in note YAML and can be edited from the deck row settings panel:

| Field | Description |
|---|---|
deckType |
head / list / card / title / file |
deckName |
Display name (optional) |
deckLevel |
Head: heading level used as card front (1–6) |
deckStatus |
false studying; true archived |
deckFile |
File mode: parent index note |
deckTemplate |
Anki note type id |
deckNumbering |
Whether to sync deck numbering into the tree field |
deckID |
Card / Title mode: Anki note id |
Under Settings → General (per-note YAML can override):
head / list / card / title / file (default Head)deckLevel is absent (default H4)[[links]] into clickable backlinks (does not affect ![[media]])Scan scope (All / Archive tabs only):
anki also matches anki/deckRequires Anki + AnkiConnect (default http://127.0.0.1:8765).
Defaults include ob-deck-basic and reversible ob-deck-basic++. Customize Front / Back HTML and CSS.

Default look in Anki:

Under Settings → Fields:
ob-deck-tags and sync Anki note tagsob-deck-backlink (Head → heading, List → block, Card → file)ob-deck-tree; optional clickable crumbsnone / oburi / aduri (Advanced URI)
| Field | Description |
|---|---|
| ob-deck-id | Note identity field (first model field for AnkiConnect) |
| ob-deck-head | Card title / navigation heading; stored separately from front body |
| ob-deck-front | Front body |
| ob-deck-back | Back body |
| ob-deck-tags | Obsidian tags; can sync as Anki tags |
| ob-deck-tree | Deck path crumbs |
| ob-deck-backlink | Backlink to the Obsidian card (heading / block / file) |
| Command | Action |
|---|---|
| Deck To Anki | Open the sync modal |
| Open sync sidebar | Open the sync sidebar view |
| Clear all deckIDs in current file | Remove deck IDs from the active note |
| Clear all deckIDs and deck YAML in current file | Remove deck IDs and deck YAML properties |
Add this repository with BRAT:
PandaNocturne/obsidian-deck-to-anki
main.js, manifest.json, and styles.css in:<Vault>/.obsidian/plugins/deck-to-anki/
npm install
npm run build
Artifacts: main.js, manifest.json, styles.css at the plugin root.
npm install
npm run dev # watch build
npm run build # production build
npm run lint
Release checklist:
version / minAppVersion in manifest.jsonnpm version <new> (updates versions.json)npm run buildgit push origin <tag>gh release create <tag> main.js manifest.json styles.cssSee LICENSE in the repository.