Fixes #12: Add ability to output markdown#25
Conversation
|
@antoniogarrote please review. |
jstoiko
left a comment
There was a problem hiding this comment.
@postatum: can you please try to run CIM (Cloud Information Model) using this and compare the output before vs after this PR?
I've compared CIM output HTML using - <tr id="schema_shipmententitygroup_shippingmethod.html-schemas-tr">
+ <tr id="schema_shipmententitygroup_shippingmethod-schemas-tr">This is because previously there were variables like I've created a PR to help migrate it to aml2doc: cloudinformationmodel/cloudinformationmodel#9 I've also added migration guide for this PR for projects that use custom HTML templates. |
Fixes #12
Try it out with a new option
--syntax:We still need to rename the repo after this PR is merged.
I've fixed this issue by simply declaring a second set of templates specifically for Markdown.
While working on it, I've considered few other options:
turndown,showdown) and none of them properly handled our html structure (tables, navigation block, etc.).Choosing either of these options would have added unnecessary complexity to the code (to make out layout with those libs) and increased number of bugs in the future. On the other hand, I think keeping templates up to date is straightforward and add no code complexity.
Migration
htmlfolder under usual templates path. E.g. if your templates resided at/somewhere/mytemplates, move them to/somewhere/mytemplates/html.{{{htmlName}}}to{{{pageName}}}.htmlfor links and to{{{pageName}}}for other things. Notice that whilehtmlNamevariable values looked likefoo.html,pageNamevalues look likefoo.{{{rangeHtmlName}}}to{{{rangePageName}}}