I used MMark primarily for its sub/superscript support. Now that it’s deprecated, I’d like to find a more sustainable solution. I want to write a custom Goldmark extension, but I don’t know where I’m supposed to put it so it can be seen by Hugo. Could someone point me to the appropriate documentation? Or is the process more complicated than that?
On a side note, has someone already written and published such an extension? My searches are turning up nothing, which surprises me. I can’t be the only one on the Internet who wants to use sub/superscript.
It doesn’t work that way. Goldmark extensions are not “plug-and-play.” You would need to fork Hugo, modify code, build, and test. Assistance with this activity is not within the scope of this support forum.
So. many. characters. I’m not a fan either, but the shortcode is just barely fewer characters if you strip the spaces. I just find it so bizarre that sub/superscript is so hard to accomplish in just basic Markdown. For now, I’m just sticking with MMark until I get motivated enough to fork Hugo and make it work.
In case you were not aware, with footnotes the superscripts are automatic:
Here is the first footnote.[^1]
Here is the second footnote.[^2]
Here is another.[^another]
[^1]: This is the first footnote.
[^2]: This is the second footnote.
[^another]: This is another footnote.
@jmooring I wasn’t asking with regards tup superscript/subscript specifically, but rather with regards to extensions. But did look at the code and saw how goldmark extensions are included. I did see how it works. Technically I could fork and add any extension. Thanks for the assistance. It’s given me some food for thought.