Flashcards

Flashcards

Give a note type: flashcard in its frontmatter and every definition list in it becomes a deck: each term is the front of a card, its definitions are the back. A Review button (a card stack) appears in the header — or press p — and the cards open full screen, one at a time, to flip through in order, at random, in a growing Concentric (FSRS) stack, or with spaced repetition.

The flashcard deck showing an answer card with Again, Hard, Good and Easy rating buttons below it

The deck overlay after flipping a card, in Concentric (FSRS) mode.

On phones (600px wide or less) and in the iOS app, a floating card-stack button in the bottom-right corner starts the deck instead of the header button. On a page that is both slides and a deck, it starts the slides, the same as p.

This page is itself a deck. The cards at the bottom are real: press p to try them.

Why definition lists?

We wanted to be compatible with an established markdown flashcard format, and looked at Neuracache, kanad13/markdown-flashcards, bttger/markdown-flashcards and Mochi. None was a good model: they want a note per flashcard, or HTML comments, or special one-off syntax.

The core requirement is that notes with flashcards stay nicely readable as text and render nicely in most places by default — in an editor, on GitHub, in other markdown tools — with anything extra being enhanced styling rather than syntax that mucks up the text. A definition list is exactly that: a term followed by its definitions is already “a question and its answer”, it is supported by most markdown renderers, and it reads naturally as plain text. mbr only adds behaviour on top.

Writing cards

---
type: flashcard
---

What is the capital of France?
: Paris.

Which two fields set a page's body classes?
: `style`
: `type`

Multi-line questions

A question can span several consecutive lines, but markdown joins them into one run of text. To keep each line on its own line, end it with a backslash (\). A line holding only a backslash gives you a blank line inside the question, which is handy for setting multiple-choice options apart from the question itself:

Which of the following is part of the Basis and Purpose of the Amateur Radio Service?\
\
A. Providing personal radio communications for as many citizens as possible\
B. Providing communications for international contesting\
C. Advancing skills in the technical and communication phases of the radio art\
D. All these choices are correct
: D

Don’t use a truly empty line instead. A blank line ends the question: the lines above it become an ordinary paragraph outside the deck, and only the lines after it become the card’s front. A question can’t hold real blocks such as a markdown list either — only answers can.

In the page itself, a flashcard note keeps mbr’s usual FAQ-style definition lists: the answers stay hidden until you click a question, which is a natural way to quiz yourself without opening the deck at all.

Reviewing

The overlay shows one card at a time, sized to fill the screen: the text is set as large as it can be while still fitting (and scrolls once it would be too small to read). Click the card, or press Enter, to flip it.

The top bar has the progress counter, a Swap sides toggle (show the answer first and recall the question), the section filter when the note has headings, the Cards box in Concentric mode, the mode, and the close button.

ModeOrderOn the back of a cardNeeds editing on
In orderAs writtenNext / PreviousNo
RandomShuffled each timeNext / PreviousNo
Concentric (FSRS)A small stack that grows as you learn itRate it: 1 Again, 2 Hard, 3 Good, 4 EasyNo (ratings are saved only when it is)
Spaced repetition (FSRS)Due cards first, then new ones in random orderRate it: 1 Again, 2 Hard, 3 Good, 4 EasyYes

The deck always opens in Concentric (FSRS), with editing on or off; pick another mode from the menu or with its key (below).

Keys

Everything in the deck works from the keyboard. Press ? in the deck for a list of every key; the hint line at the bottom says so. The navigation keys mirror the ones slides use, so the same fingers work in both.

Navigation

KeyAction
pOpen the deck (on a flashcard page)
Space / → / PageDown / nAdvance: flip a card that shows its front; on the back, go to the next card
Enter / clickFlip the card either way
← / PageUpPrevious card (In order / Random)
Home / EndFirst / last card (In order / Random)

Rating (Concentric and spaced repetition, on the back of a card)

KeyAction
1Again
2Hard
3Good
4Easy

Deck controls

KeyAction
cSwitch to Concentric (FSRS)
oSwitch to In order
rSwitch to Random
sSwitch to Spaced repetition (FSRS); ignored when it is not offered
wSwap sides (show the answer first)
fOpen the section filter with focus on its first box (when the note has one). Inside it: ↑ / ↓ (or Tab) move, Space ticks, a picks All sections, Esc or f closes it and puts focus back
+ / =One more card in play (Concentric; same as raising the Cards box)
-One fewer card in play (Concentric)
#Put the cursor in the Cards box (Concentric). Type a number; Enter applies it, Esc leaves it unchanged, and both return to the card
?Show or hide the list of shortcuts (Esc also closes it)
EscClose the shortcut list, the Cards box or the section filter if one is open; otherwise leave the deck and return to the page

A mode key for the mode you are already in does nothing, so it cannot lose your place. While the deck is open the page’s own shortcuts are switched off, and keys held with Cmd, Ctrl or Alt are left alone, so browser shortcuts such as printing still work.

In the rated modes (Concentric and spaced repetition) a card can only be left by rating it, so on the back Space and → do nothing except point at the rating buttons — a stray key cannot skip a card you were meant to grade, and there is no going back. Rating a card (by key or click) moves straight on to the next. Keys typed into the Cards box or the filter stay there.

Concentric (FSRS)

Concentric (FSRS), the deck’s default mode, drills a small stack of cards, folds in new ones as you come to know it, and puts away the ones you find easy — so the stack grows outward in rings, like concentric circles. It is closely related to Incremental Rehearsal, also called folding-in (Tucker 1988, unpublished teaching materials, often cited as Tucker 1989), a drill technique from special education where unknown items are worked one at a time into a set that is mostly known. A meta-analysis of 19 Incremental Rehearsal studies by Burns, Zaslofsky, Kanive and Parker found large effects on learning, though no clear efficiency advantage over other drills (Burns et al. 2012; overview at Intervention Central). It needs no editing: it works on a static site too.

How it runs:

  1. Starting stack. Six cards (or every card, if the note has fewer). If the note has any review history, a quarter of the stack, rounded up, is seeded with challenging cards: first ones whose latest rating was Again or Hard, then ones never reviewed. The rest are random. A note with no history at all starts with a plain random six.

  2. Rate each card. The card goes back into the stack at a position that depends on the rating, with a little jitter, but never sooner than a minimum number of other cards:

    RatingGoes back…Earliest return
    Againabout a quarter of the way in (20–35%)after 3 other cards
    Hardabout halfway (40–60%)after 4 other cards
    Goodnear the back (75–100%)after 4 other cards
    Easyto the very back—

    In a stack too small for the minimum, the card goes to the very back.

  3. Grow. After every rating the deck counts the cards it treats as known: those whose latest rating in this session is Good or Easy. A card not yet rated this session does not count, whatever its history says, so a stack never looks learned before you have seen it. While at least 70% of the stack is known, one new card is folded in at a random place (never the card on screen) and the share is checked again. A new card is unrated, so each one lowers the share: with six cards, the stack grows as soon as five are known (5 of 6 is 83%; 5 of 7 is 71%, so a second card comes in; 5 of 8 is 62%, so it stops at eight). Six of six known at once would grow it to nine.

  4. Discard. A card you rate Easy twice in a row in this session is discarded: it leaves the stack, goes back to the pool, and one card from the pool takes its place. “In a row” counts that card’s own ratings — any other rating of it starts the count over, and earlier sessions’ history does not count. With nothing in the pool to swap in, the stack gets one card smaller. Good never discards a card.

  5. Which cards come in. Growth, swaps and raising the Cards box take cards from the pool in this order: latest rating (history or this session) Again or Hard, then never rated, then Good, then Easy — at random within each group. Discarded cards come last: a swap or a bigger Cards box brings one back only when nothing else is left, growth never does, and a card that comes back starts its Easy count over.

  6. Toast. When a rating folds cards in or discards one, a small note next to the counter says so for a moment: +2 for two cards folded in, −1 +1 for a swap, −1 +2 for a swap that also grew the stack. Screen readers hear it as “1 card discarded, 2 added”. With reduced motion it appears and disappears without animating.

  7. Mastered. When there is nothing left to fold in (every card is in the stack or discarded) and every card in the stack is known, the deck says so and offers Keep practising (the same stack carries on) or a new stack. It says so on the rating that gets there, not on every rating after it; a miss that undoes it and a later rating that restores it will say so again. Otherwise Concentric never ends on its own — close it whenever you like.

The Cards box in the top bar shows the stack’s size and follows it as it grows. Change it at any time: raising it adds cards in the order above, lowering it sends the cards you know best back to the pool (Easy before Good before not yet rated, never the card on screen). A stack thinned by discards keeps the size you chose in the box. The counter reads 8 in play · 4 left: cards in the stack, and cards still to be folded in. Once any card is discarded it adds · 1 discarded; discarded cards are not counted as left.

Saving. With editing enabled, every Concentric (FSRS) rating is written to the card’s review history exactly as a spaced repetition rating is, so practice counts toward FSRS scheduling later. Without editing — a static site, a read-only server — ratings last for the session only: they steer the stack but nothing is written. If a write fails, the deck says so and the rating still counts for the session. When the note changed on disk (or on another device), the deck offers to reload the page for the latest version; if you stay, it stops writing and carries on session-only. A page reached under a hostname the server will not take edits from (behind tailscale serve or a reverse proxy, with no edit token configured) is rendered with editing off, so its ratings are session-only from the start; to save reviews there, configure an edit_token_hash (mbr --generate-edit-token). Should a write still be refused (403, e.g. the server restarted without --edit under an open page), the deck stops writing without a notice — except in spaced repetition, which says so once. Any other failure (a missing edit token, the server unreachable) is retried with the next rating, so saving resumes as soon as it can. Spaced repetition instead keeps the card on screen after such a failure, so the same rating can be retried.

The growth threshold is configurable with flashcards_concentric_threshold (default 0.7).

Where the numbers come from

Filtering by section

When the note’s cards sit under two or more headings, the top bar has a funnel button. It opens a list of the headings that contain cards, indented by level; tick one or more to review only the cards under them. A heading includes everything under it, subheadings too. With nothing ticked (All sections), every card is in the deck, and the funnel shows a dot while a filter is on. A heading that holds every card in the note is left out, since it would filter nothing.

Changing the filter restarts In order and Random on the chosen cards, re-plans a spaced-repetition session over them, and in Concentric swaps cards in and out of the stack while keeping its size. Esc or a click elsewhere closes the list. The filter is not remembered: each time the deck opens it starts on every card.

Progress in the page

Once a note has any review history, the page itself shows how it is going:

The pies are drawn without any text, so selecting or searching a heading finds only its words. After a deck session that saved reviews, the borders and pies redraw when the deck closes. A note with no history shows neither. Turn them off with flashcards_progress_indicators = false.

Spaced repetition (FSRS)

Spaced repetition shows each card again just before you would forget it, so easy cards come back rarely and hard ones often. mbr schedules with FSRS, the Free Spaced Repetition Scheduler that modern Anki uses, through the ts-fsrs library. The four ratings mean what they mean in Anki:

RatingMeaning
AgainYou did not remember it
HardYou remembered, with real effort
GoodYou remembered after a moment’s thought
EasyYou remembered instantly

Each button shows when the card would come back, e.g. 1m, 10m, 3d.

A session shows the cards that are due first — the ones you are most likely to have forgotten first, with ties broken at random — and then the cards you have never reviewed, shuffled, so a note with little history does not open on its first card every time. A card you rate Again (or a new card still in its first minutes-long learning steps) is shown again later in the same session rather than in ten minutes’ time, like Anki’s “learn ahead”. When nothing is due, the deck says when the next card is, and offers to review at random anyway.

Scheduling uses FSRS’s default parameters (90% target retention, 1-minute and 10-minute learning steps, a 10-minute relearning step) with fuzz off, so the same history always produces the same schedule.

When it is available

Spaced repetition has to write your results somewhere, and mbr writes them into the note itself — so it is offered only when the page is served with editing enabled (mbr -s / mbr -g with editing on). A static site, or a server without editing, still offers Concentric (FSRS) — session-only, nothing saved — In order and Random. On this documentation site, which is a static build, the mode is not offered.

The deck finds each card in the file by its question’s source line, which the page carries as data-mbr-line. That attribute also serves review notes, but turning those off with --no-review does not take spaced repetition with it: with editing on, questions keep their line and nothing else on the page gets one.

The review history

Each rating is appended to the card as one more definition:

What is the capital of France?
: Paris.
: ___Review History___
  * 2026-10-06 13:45 - Again
  * 2026-10-06 13:55 - Good
  * 2026-10-07 09:10 - Hard
  * 2026-10-09 18:02 - Easy

Each entry is stamped with your device’s clock when you rate the card, and the server writes only that line (plus the ___Review History___ line the first time), keeping the file’s line endings. If the note changed on disk since the page loaded, nothing is written and the deck offers to reload the page; reload to continue saving. The endpoint is POST /.mbr/flashcard-review.

Times are your local wall-clock time, without an offset, and are read back in the browser’s time zone — so it does not matter where the server runs. The server refuses a time more than a day or so from its own clock, which catches a badly set device clock. Reviewing while travelling across time zones writes entries in whichever zone you are in, which can nudge a day boundary slightly; that is the price of history a human can read at a glance.

The demo deck

A small deck about mbr, markdown and general knowledge. Press p, or click a question to peek at its answer. The two headings below are there to try the section filter and the progress pies.

mbr and markdown

What does mbr stand for?
Markdown browser.
Review History
  • 2026-10-06 20:59 - Easy
Which key opens search in mbr?
/ (slash).
Review History
  • 2026-10-06 20:59 - Good
How do you write a markdown link to example.com with the text “Example”?
[Example](https://example.com)
Review History
  • 2026-10-06 21:00 - Easy
Which two frontmatter fields set a page’s <body> classes?
style
type
What are mbr’s three main jobs?
  • A previewer that renders markdown on the fly
  • A browser for navigating, searching and tagging a whole repository
  • A static site generator
What does the mbr logo look like?
The mbr logo
What does FSRS stand for?
Free Spaced Repetition Scheduler.
How do you start a fenced code block in markdown?
A line of three backticks (or three tildes), optionally followed by a language name.
In a definition list, what does a line starting with : mean?
It is a definition — on a flashcard page, an answer — of the term above it.

General knowledge

What is the capital of Australia?
Canberra.
Review History
  • 2026-09-14 08:12 - Again
  • 2026-09-14 08:24 - Good
  • 2026-09-17 19:40 - Good
  • 2026-10-06 20:59 - Again
What is the chemical symbol for gold?
Au, from the Latin aurum.
Review History
  • 2026-09-20 21:03 - Fail
  • 2026-09-20 21:15 - Hard
  • 2026-10-06 20:59 - Easy
Which planet has the shortest day?
Jupiter — it turns once in about 9 hours and 56 minutes.
How many bits are in a byte?
Eight.