hmngwy / weblog.sh

Blog from the Command Line
https://weblog.sh/
GNU General Public License v3.0
141 stars 8 forks source link

Markdown support #8

Closed hmngwy closed 8 years ago

neeasade commented 8 years ago

perhaps of note: http://git.z3bra.org/cgit.cgi/monochromatic/tree/tomarkdown.sed

hmngwy commented 8 years ago

The endpoint stores the raw file in a different field (from the processed string), so I can just send that back to the user without any pre-processing, instead of converting html to markdown/plain and back.

P.S. though it's really beautiful that you can do this with sed. 👍

james-see commented 8 years ago

Would really like this unless there is a way to also just read and convert regular html? I tried doing h tags and others and it renders them literally.

hmngwy commented 8 years ago

There is currently alpha support of Markdown. Simply name your files with a .md extension. The H1 (or #) will be the title.

On Mon, Nov 23, 2015 at 3:02 AM, James Campbell notifications@github.com wrote:

Would really like this unless there is a way to also just read and convert regular html? I tried doing h tags and others and it renders them literally.

— Reply to this email directly or view it on GitHub https://github.com/hmngwy/weblog.sh/issues/8#issuecomment-158789727.

james-see commented 8 years ago

Ah, that makes perfect sense. I'll try it out. Thanks!

james-see commented 8 years ago

I tried it and it works great. Using gratipay to micro-support as much as I can which is very minimal right now. Cheers.

hmngwy commented 8 years ago

Thanks @jamesacampbell! Every bit helps.

GSI commented 8 years ago

I wonder why "Markdown support!!" is always the first thing called for in such projects. Textile is much easier and intuitive, while being just as powerful.

I guess most MD-fanatics simply never heard of Textile. Cannot think of any other logical reason;

hmngwy commented 8 years ago

Speaking of markdown, markdown support applied a few commits back, closing.