Tufte Sidenotes Plugin

Problem

I wanted footnotes/sidenotes that feel like an editorial essay: readable in the margin, but still usable on mobile.

Approach

  • Implemented a small Markdown-It inline rule for ^[…].
  • Rendered sidenotes as a label + checkbox + sidenote span, matching the classic Tufte pattern.
  • Kept the content authoring simple: write ^[note text] directly in Markdown.

Result

  • Notes render inline on desktop with a clean margin layout.
  • On narrow screens, the same markup degrades to a tap-to-toggle note (no JS required).