Building a Simple Markdown PWA App

While I didn’t share it on the blog, last week I tasked Claude with using Electron to build a Markdown viewer app. It was part test (how well can Claude work with Electron) and part real need – I work with Markdown files all the time but didn’t have a simple "view focused" application for it. I was sure there open source or paid app options out there, but I wanted my own. Claude did a pretty good job (you can see the source here) but one thing stood out to me – the size of the bundled app. I created both a Mac and Windows distribution and both were around 90 megs. That’s not huge of course, but still felt like a lot for what could – in theory –... more →
Posted in: JavaScript

Parsing Markdown in BoxLang – Take 3

Ok, so I promise this will be my last post on using Markdown with BoxLang. At least the last one this month. 😉 I first covered the topic last month, "Parsing Markdown in BoxLang" where I demonstrated using the Flexmark Java library in BoxLang code. I then followed up with a revised edition that used BoxLang’s Java integration a bit nicer. So, those posts are still very valid, still useful for showing you how to make use of the JVM from BoxLang, and with the vast library of open-source Java stuff out there, that’s a good thing. But… you don’t need to do any of that for Markdown, because now it’s even easier! If you prefer to consume this post while listening... more →
Posted in: JavaScript

Creating a PDF Book from Markdown with BoxLang

Recently I’ve done some blog posts on BoxLang involving Markdown and PDFs, and I was curious if I could put together something that really demonstrated a complete tool of some sort. With that in mind, I built a "book" system where you can author pages in Markdown and use a BoxLang CLI script to generate a resulting PDF. It’s more a POC than a real app, but it was pretty fun to build. Here’s what I did. Functionality At a high level, the book is created from a source of Markdown files. Each Markdown file can use front matter (data on top) to define variables that are evaluated at the time the book is created. You can also use a "global" data file to define... more →
Posted in: JavaScript

Parsing Markdown in BoxLang – Take 2

A long, long time ago, ok, it was last Thursday, I posted about adding Markdown processing to BoxLang via the Flexmark Java library. After posting it, a few folks were curious why I didn’t use the native import process instead of createObject('java', '...') and the answer was simple – I just didn’t think about it! To give you an idea of the difference, let’s first consider the initial version: function markdownToHTML(str) { // .init() is important! ds = createObject("java", "com.vladsch.flexmark.util.data.MutableDataSet","flexmark-all-0.64.8-lib.jar").init(); ps = createObject("java", "com.vladsch.flexmark.parser.Parser","flexmark-all-0.64.8-lib.jar").builder(ds).build();... more →
Posted in: JavaScript

Parsing Markdown in ColdFusion

Welcome to my third, yes, third, ColdFusion post in 2024. Is it a trend? Who knows. That being said, I’m doing some prep work to update my presentation on Google Gemini in preparation for my talk at Adobe’s ColdFusion Summit later this month, I’m updating my Node.js demos to ColdFusion and ran into an interesting issue – converting Markdown responses from Gemini to HTML. Edit: I realized I gave my function at the bottom a dumb name. I updated the code to reflect a better name on 9/18/2024 My first quick Google searches didn’t really mesh well with what I expected, so I asked on the CFML Slack and James Moberg pointed out a few options, but suggested I focus on Flexmark... more →
Posted in: JavaScript