kristapsdz / sblg

static blog utility
https://kristaps.bsd.lv/sblg
ISC License
94 stars 14 forks source link

Possiblity of supporting markdown? #3

Closed brycv closed 7 years ago

brycv commented 7 years ago

I talked to @michaeldexter about sblg recently and he said you might be open to markdown as a format for articles. I have an existing site using octopress but it is too complex and I want something simpler. It looks like sblg is exactly what I am looking for but I prefer markdown and have hundreds of posts that are currently in markdown. I am happy to change things around but still enjoy writing in markdown if possible. Is that something you would consider?

kristapsdz commented 7 years ago

I've been thinking about it. Basically, having an extra step where a markdown file is converted to HTML5 on-the-fly. You can do it now with any markdown-HTML formatter, but getting the correct <article data-sblg-article="1"> needs to be in there. There are a number of C interfaces for Markdown that can be used pretty easily, I think.

brycv commented 7 years ago

That would be fantastic!

kristapsdz commented 7 years ago

As a quick fix, I just took the output of hoedown and wrapped it:

( echo "<article data-sblg-article=\"1\"> ;
  hoedown --xhtml README.md ;
  echo "</article>" ) > README.xml
sblg -t template.xml -c README.xml

Any markdown converter should do.

brycv commented 7 years ago

I'll try that. Thanks!

kristapsdz commented 7 years ago

Apropos that: lowdown. Couldn't find an OpenBSD port for hoedown and the other formatters are huge. It's just a cleaned-up and simplified hoedown with sandboxing and some other goodies.

Happy, @michaeldexter? I know you're behind this all! I see you behind the curtain!

brycv commented 7 years ago

I am going to try discount. It is written in C and seems to be reasonable.