A Quarto extension for rendering Quarto documents to HTML that can be used with Ankivalenz to generate Anki cards.
Install the extension to your Quarto project:
quarto add vangberg/quarto-ankivalenz
Create an Ankivalenz configuration file:
ankivalenz init .
Set the format
metadata to ankivalenz-html
in your document's YAML header:
---
title: "My Document"
format:
ankivalenz-html: default
---
Render your document as usual:
quarto render my-document.qmd
The file will be rendered as my-document.ahtml
. Add "input_ext": "ahtml"
to
ankivalenz.json
, and run Ankivalenz to generate an Anki deck:
ankivalenz run .
Add the ankivalenz-html
format to your book's format
list in _quarto.yml
:
format:
ankivalenz-html: default
Add input_ext
and input_dir
to ankivalenz.json
:
{
"deck_id": 123456789,
"deck_name": "My Deck",
"input_ext": "ahtml",
"input_dir": "_book"
}
Render your book as usual:
quarto render .
Generate the Anki deck:
ankivalenz run .