-
markdown-it
Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
First, I setup mustache (npm package) as the templating language (the npm package hasn’t been updated in two years, so that’s great). Mustache is really simple, it provides a few helper utilities, like replacing variables, or iterating over data,
Next, I setup a markdown parser, markdown-it. I then created another Mustache lambda for converting markdown to HTML and injecting it in the template output. I also ran the Markdown string through the Mustache parser, so I could use my “media” lambda inside markdown. This is where things got gross in the code.
This obviously does not work with the Mustache parser. So I had to uninstall another package to decode the HTML entities, and then deal with the original recursive replacement problem. Here’s what the final code looks like:
Ditch TOML in favor of YAML or JSON 5.
You can find the full source code for this here.