AusDTO / gov-au-beta

User facing frontend to the GOV.AU content site.
MIT License
10 stars 6 forks source link

use kramdown renderer instead of redcarpet #568

Open ltankey opened 7 years ago

ltankey commented 7 years ago

This PR uses Kramdown instead of RedCarpet as the markdown renderer.

This gives authors the ability to use definition lists.

Due to the way that Kramdown compiles its documents, table-of-contents are refactored out as a separate explicit template specification, and are instead compiled as part of the content itself. An inline specification is used to inject the TOC at the head of the document's contents.

Note: various content-tests have been refactored to suit the kramdown markdown syntax for headings, which requires that a heading is preceded by a blank line.

ltankey commented 7 years ago

Fair question - the specs have been updated to work with these changes, but the output hasn't changed.

I could add some additional tests for the node_decorator however there is no specs for the markdown renderer service, which might be worth adding.

coderdan commented 7 years ago

Yeah up to you but I think the specs for the markdown renderer would be a good improvement.