Skip to content(if available)orjump to list(if available)

Mdx – Execute Your Markdown Code Blocks, Now in Go

dim0x69

Hey HN!

I recently came across makedown here on HN and loved the concept. Wanting to learn Go, I thought this could be a great starter project - so I started working on my own Go implementation, which I’m calling mdx (https://github.com/dim0x69/mdx).

Key Features:

- Define dependencies between commands

- Supports shebangs

- Ability to pass arguments to code blocks

Would love feedback and thoughts!

Ref. makedown: https://github.com/tzador/makedown. Thanks for the idea! :)

nicoburns

You might want to reconsider the name. MDX is already a well-known technology that combines markdown with JSX https://github.com/mdx-js/mdx/

lagniappe

This is really cool, I was just thinking recently about something like that. What do you plan to add to it next? What do you think of Go?

wdavidw

It is similar to how CoffeeScript literate works.

nikolay

You really didn't know Runme [0] existed?

[0]: https://docs.runme.dev/installation/cli

stevekemp

I guess these kinda toy scripts/utilities get written a lot as they're not really super-common and there's no well-known standard.

I wrote my own version too, a while back, because it seemed like it would be useful (and indeed it has been) - a golang tool to list/search/run named blocks from markdown, joining multiple blocks together if instructed to do so:

https://github.com/skx/runme

eterps

Could use some more (or better?) examples of how this can be useful.

glyphacki

I can think of code examples in the documentation. At least you make sure the code is executed or even check the output of the examples.