56 points by hjinco 2 days ago | 31 comments | View on ycombinator
Igor_Wiwi 2 days ago |
erlkonig 1 day ago |
This makes it super easy to write something cool on Reddit or whatever, then just paste the markdown into an index.smd file in a new directory (named meaningfully) and poof it's in a webpage.
The core of all of it is a /var/www/cgi-bin/markdown-to-html program centered on:
python3 -m markdown -x codehilite -x fenced_code -x toc
It's enabled in my ~/www/.htaccess of all places: # This works, with setup in /etc/apache2/conf-enabled/mod-ext_filter-adds.conf
AddType text/markdown .md
AddType text/markdown .smd
AddOutputFilter markdown-to-html md
AddOutputFilter markdown-to-shtml;INCLUDES smd
Much easier to just edit markdown (index.smd usually) and reload than reconvert, and that filter above lets you include arbitrary HTML too, critical to deal with markdown numerous weaknesses.KomoD 1 day ago |
forgotpwd16 1 day ago |
barishnamazov 2 days ago |
Separately, be cautious of people putting illegal content on your platform.
thunderbong 2 days ago |
undefined 1 day ago |
dhruv3006 1 day ago |
Also, nice project - I like the thinking here.
acrophiliac 2 days ago |
preya2k 1 day ago |
souvlakee 2 days ago |
wiether 2 days ago |
First thing that came to my mind: how do I "curl" a md to it?
But then, I don't know how you intend to manage spam/abuse
saltwounds 2 days ago |
NamlchakKhandro 1 day ago |
382hi 1 day ago |