This is nice for iterating, but for an actual deployment it's not so nice for three reasons:
(1) Prevents outside navigation into named anchors.
(2) Makes the content slow to load.
(3) Suffers from a flash of unstyled content.
You can use chrome to bake out the HTML with a one-liner: chrome mydoc_md.html --headless --dump-dom --virtual-time-budget=1000 > mydoc.html
The resulting HTML is fast to load and just as beautiful.