Attempt number 1 of auto-converting my markdown based website to #gemini
Currently only available via HTTPs and various #p2p protocols but eventually I'll add a proper gemini server to my main distributed press instance for it. 🤪 Might end up coding one since it's easier than searching through all the options for something that will fit my needs.
hyper://agregore.mauve.moe/explore.gmi
@alex Oh cool! Is your patch published somewhere I may read?
@lutindiscret @adele It's been here for a few years actually! I just don't think any other clients support the p2p :P
@mauve I love seeing how people use Markdown like this.
I ended up writing a Markdown to Gemtext translator in C# based on the Python converter for my SSG.
@dmoonfire Thst sounds awesome. Did you publish your code by any chance?
@mauve Oh sure, it's in my C# monorepo:
https://src.mfgames.com/mfgames-cil/mfgames-cil/src/branch/main/src/MfGames.Markdown.Gemtext
Tests are at:
https://src.mfgames.com/mfgames-cil/mfgames-cil/src/branch/main/tests/MfGames.Markdown.Gemtext.Tests
The original inspiration is from:
https://github.com/makew0rld/md2gemini
If you want to see the results, I use it on both gemini://d.moonfire.us and gemini://fedran.com (and their https versions).
@dmoonfire I'm not used to C# so it's neat to see how you've subdivided stuff in your ObjectRenderers classes.
My JS code is a lot more slapstick in comparison :P
@mauve If you are doing JS, you might consider an existing Markdown library and do the same, just process the generated AST or override the renenders.
@dmoonfire @xoofx Ah that's cool. I had Marked do the heavy lifting in their tokenizer and I did soma basic AST traversal in a generator function that yielded bits of text.
i've neer seen a hyper:// link. What does it refers to?
@0x1de You can resolve them using @agregore or @peersky
it refers to files hosted using the p~p library "hyperdrivs" from https://docs.pears.com/building-blocks/hyperdrive
@mauve I patched the Gemini server “Satellite” (in Go) to also serve Markdown files as gemtext. You are not alone. 😄