-
Notifications
You must be signed in to change notification settings - Fork 0
Fixes #12: Add ability to output markdown #25
base: master
Are you sure you want to change the base?
Conversation
@antoniogarrote please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@postatum: can you please try to run CIM (Cloud Information Model) using this and compare the output before vs after this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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
html
folder under usual templates path. E.g. if your templates resided at/somewhere/mytemplates
, move them to/somewhere/mytemplates/html
.{{{htmlName}}}
to{{{pageName}}}.html
for links and to{{{pageName}}}
for other things. Notice that whilehtmlName
variable values looked likefoo.html
,pageName
values look likefoo
.{{{rangeHtmlName}}}
to{{{rangePageName}}}