[Semi-OT] Best method to convert Kramdown to Commonmark

Hi all,
In my quest to move a large blog(~4000 posts) from Jekyl to Hugo I am finding an issue with moving markdown specifically some of the kramdown markup like {: width …etc . The hugo import jekyll {path} {path} seems to just move files over. Has anybody made a tool for this or has some advice on how to properly convert kramdown to goldmark?


Actually Goldmark follows the Commonmark spec.

Therefore I updated the topic title.

I think that you will have better luck searching the web, we do not exactly provide support for conversions between different Markdown specs in this forum.

With that said a cursory search yielded the following result:

1 Like

Thanks for your pointer URL I will check it out

As far as not supporting it, Hugo might want to consider it or point as you did in the documentation for the following reasons:

  • Is it really an edge case and do you expect it to remain so?
  • Will not doing so drive people away or hamper adoption?
  • Will making it a link in documentation improve attitudes towards the product/support channel/ help transition to the product?

This is an Open Source project with a single maintainer who is aided by volunteers.
The forum is generally speaking only for Hugo support or how something can work with/in Hugo.

I don’t quite understand the above questions.
Especially in relation to your question about converting Kramdown to Commonmark.

Hugo uses the third party/upstream Golmark Markdown processor, who in turn follows the Commonmark spec.

Anyway for reference please have a look at the:

Forum Guidelines as well the Requesting Help guidelines.

Thank you.

First thank you, @bep and everyone who works on this product/community. I am very aware what a feat it is for this all to work.

The forum is generally speaking only for Hugo support or how something can work with/in Hugo.

Absolutely. I view migrating as an important support issue. Migration is the context of my questions. E.g. will migrating from Kramdown (and other platforms in general) be a rare situation? Will not supporting migration questions and docs cause people to not go down the path of Hugo, etc. Or better would providing them do so? I don’t know but that was the context.

I would love to see migration support as a community topic so that I could ask questions while in the midst of it and help others when possible.

For those looking at this for support, at the moment I’m mulling a few options. One using a ruby script to convert kramdown to html and html back to commonmark. Another is writing my own script to adjust the .md files as necessary. I will update when I’m done.

Thanks again.

People in this forum do help with migration questions, but we cannot know the specifics for the various setups, hence me tagging the topic as Semi-OT.

As you’ve probably seen there is a guide about migrating from Jekyll in the documentation and some conversion commands in the CLI, also there are various topics in the forum -although admittedly these may contain outdated info-.

Let us know how it goes.

Also if you think that others may benefit from your migration process, please post a tutorial in the tips & tricks category.

I would say so. And it’s surprisingly hard to write generally useful conversion scripts (I have certainly many half baked tools floating around).

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.