Closed JasonYao closed 3 years ago
taking a step back, this is the second time that I wish hugo had the ability to "wire into" the markdown -> html renderer- the first time was when I wanted to output a nice "copy" button to code blocks, but had to add in js to do it dynamically, instead of it just being in the generated html.
Instead of just going ahead and getting this working with js, see if there's a way to actually change the generated output itself, so we can get rid of js modifying the DOM after things load, since that has a performance hit
googling around didn't find anything, though it should be noted that with defer
it looks like we should be ok. Fixed with b194323dfd190e6ef8825be970bb92435c7c2824
NOTE: there's a stab at it over in this branch, but it dropped lighthouse score by about 20 points due to making page load slower. Consider wiring into generated content somehow, or other alternative approaches