Always start off with a quote....testing 1..2..3
This page was generated from a markdown(.md) file and translated to html automatically in a program written in DLang. I am primarily using this page as a 'test page' and it it likely that it will evolve. That said, while it is the first page that is published, it is likely to be the most frequently updated (and I even expect it may even be broken at various times depending on when you look at it). I'll sporadically add some notes on the design over time -- but anyways -- welcome to a markdown to html transpiler!
I use 'two' passes to do the translation. The first pass does a basic subsitution to handle many common and trivial replacements (e.g. replacing a pound symbol on a single line with the h1 tags). The second pass does a little bit more work to otherwise handle 'sequences' such as blockquotes where I translate multiple >'s into a single blockquote ... /blockquote tag. The result of this system is that is relatively simple and a very fast transpiler for the current subset of markdown that I support.
Once again, this blog post serves as a sort of
The total project time was probably around 8 hours of time to complete for the initial creation. I hate having to say this, but I did not use any AI tools. The 'why' is in part because it is 'fun'. Programming is fun, and thinking slowly and doing things by hand helps me think. As I need more features, I have otherwise put in a few hours here or there -- typically every time that I add a new blog post I may need some new feature.
On Sept. 19, 2026, I spent another 4-5 hours getting hyperlinks to work properly, fixing references, and a few other buggy/fragile pieces of the transpiler.
For my build system, I simply run rdmd ./src/.d test.md on any markdown file.
// Compiled with: rdmd ./src/*.d test.md
void main(string[] args){
// Handle program Arguments
if(args.length < 2){
writeln("Usage: rdmd blog.d file.md");
return;
}
// Creates an html file from a markdown file.
CreateHTMLFile(args);
}
My markdown to html generator lets me count to 15...here's a few numbers
There will probably be a third pass in order to build a table of contents, or perhaps automatically 'search' for important terms in a glossary. The advantage of writing your own tools, is you can make up whatever tags you want and do anything with them.
This is a quote spread over multiple
lines with some other formatting goodies
to try to break the parser
A few features I should think about
It may be
This is
There are also
Broken up with some text here
// Here is some more code
import std.stdio;
okay here's some more stuff
And that's all folks!