pages-gem icon indicating copy to clipboard operation
pages-gem copied to clipboard

Change default markdown parser

Open ghost opened this issue 6 years ago • 1 comments

currently kramdown is the default parser:

https://github.com/github/pages-gem/blob/fb5c3f22a5789aee30c942e30962a69a8ac75e3a/lib/github-pages/configuration.rb#L20

however this has caused many issues, as kramdown is quite different from CommonMark/GFM:

  • https://github.com/gettalong/kramdown/issues/558
  • https://github.com/gettalong/kramdown/issues/306
  • https://github.com/gettalong/kramdown/issues/211
  • https://github.com/gettalong/kramdown/issues/197

and the kramdown author is unwilling or unable to fix these issues, for several years now. after some hand wringing i discovered that you can simply use commonmark with github pages:

markdown: CommonMarkGhPages

http://github.com/github/jekyll-commonmark-ghpages

and you dont even have to declare the plugin in _config.yml as its activated by default:

https://github.com/github/pages-gem/blob/fb5c3f22a5789aee30c942e30962a69a8ac75e3a/lib/github-pages/plugins.rb#L7-L9

ghost avatar Dec 13 '18 00:12 ghost

A better way to fix this IMHO would be to update kramdown to a recent version, as all of those issues are fixed.

fuzzy76 avatar Aug 17 '19 17:08 fuzzy76