Top
Best
New

Posted by dim0x69 10/26/2024

Show HN: Mdx – Execute your Markdown code blocks, now in Go(github.com)
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! :)

127 points | 56 commentspage 3
nikolay 10/26/2024|
[flagged]
stevekemp 10/26/2024|
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

sourishkrout 10/26/2024|||
Great name ;)! Co-creator of https://github.com/stateful/runme here.

We've expanded significantly onto the idea of a toy script/utility to bring multi-modality (editor, notebook, terminal, browser) with shared sessions to what's at the core, a universal task runner (see architecture link below).

I'd love to chat about combining efforts if you love hacking on this. The same goes for the author of `mdx`.

https://docs.runme.dev/resources/architecture

oezi 10/26/2024|||
Great!

One hint: your examples need to be escaped to show the fence syntax. Add 4 spaces I think.

sourishkrout 10/26/2024|||
Could you please link the example? In the repo itself? There are quite a few. I want to be sure we get that fixed.
oezi 10/26/2024||
The first one for example: uptime

I can't see the fence instructions (without entering raw, I guess)

stevekemp 10/26/2024|||
I've added that now, thanks!
sourishkrout 10/27/2024||
Ah, the other Runme... that explains why I couldn't find it.