Or a static HTML file served by (GitHub|Codeberg|Cloudflare|Vercel|Netlify) Pages, and run the formatting logic client-side.
I started teaching an (older) adult Sunday school class almost exactly one year ago this coming Sunday. I post the notes on one of my blogs. They're generated as a static site via Astro, and I have a few Markdown helpers for making it easier to link to scripture, etc., and while it's not a lot of work, I know I'll tire of it eventually. Or something else will come up.
I doubt I'll be happy whenever it does, but I'm extremely appreciative of your comment for this reason. I hope I'll remember what you've written when that day arrives.