ctulocal1/2019-district-contract

Script to convert YAML-MD contracts to JSON-HTML

Closed this issue · 4 comments

YAML-Markdown is a good way to convert Word contracts to a format readable and writable by both humans and Javascript. For use in Service Workers, routing and static site generation, JSON-HTML is superior. JS-YAML library can already convert YAML to nice, minimized JSON, but I need to add the Markdown to HTML conversion, either before or after the YAML to JSON conversion.

The script also needs to run through the data object and add mappings for previous and next articles, as well as a mapping to a breadcrumb tree for each article or clause.

On second thought, breadcrumbs can be easily added during injection into shell. However, child article numbers should be added.

Actually, the children,etc. Should be added during hydration, in order to minimize payload size for deployment. I'll make it a separate step as part of the render and search processes.

Finished!