Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Fixes #12: Add ability to output markdown #17

Closed
wants to merge 22 commits into from

Conversation

postatum
Copy link
Contributor

@postatum postatum commented Oct 3, 2019

Fixes #12

Try it out with a new option --syntax:

npm run aml2doc -- ./outdir --indir=./test_data --syntax=md

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:

  1. Convert HTML->Markdown. This didn't work out because I've only found few decent converters (turndown, showdown) and none of them properly handled our html structure (tables, navigation block, etc.).
  2. Convert Markdown->HTML. I decided to not follow this path because if we had templates in md, rendered them and then converted to html, it would break multiple things: css classes/ids, using custom css files.

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.

@postatum postatum requested a review from jstoiko October 3, 2019 08:36
@postatum
Copy link
Contributor Author

This PR will need to be update to display primary, secondary and index links in generated Markdown after this issue is fixed #19.

@postatum postatum changed the title Fixes #12: Add ability to output markdown (WIP) Fixes #12: Add ability to output markdown Oct 28, 2019
@postatum postatum added the pending Waiting for a response of feedback label Oct 28, 2019
@postatum postatum changed the title (WIP) Fixes #12: Add ability to output markdown Fixes #12: Add ability to output markdown Oct 28, 2019
@postatum postatum added blocked Issue/PR blocked by another issue/PR and removed pending Waiting for a response of feedback labels Oct 28, 2019
@antoniogarrote
Copy link
Contributor

I will rebase this during this week

@postatum postatum changed the title Fixes #12: Add ability to output markdown [WIP] Fixes #12: Add ability to output markdown Jan 7, 2020
@postatum

This comment has been minimized.

@postatum postatum closed this Jan 7, 2020
@postatum postatum reopened this Jan 29, 2020
@postatum postatum removed the blocked Issue/PR blocked by another issue/PR label Jan 29, 2020
@postatum
Copy link
Contributor Author

I've resolved merge conflicts with master, added links supports to md and tests.

Work in this PR is complete and ready to be reviewed.

@postatum postatum changed the title [WIP] Fixes #12: Add ability to output markdown Fixes #12: Add ability to output markdown Jan 29, 2020
@postatum
Copy link
Contributor Author

postatum commented Mar 3, 2020

Closing in favour of #25

@postatum postatum closed this Mar 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to output mardown
2 participants