huytd / azeroth-js

:beer: Yet another Static blog engine. Built with :heart: for Github
216 stars 52 forks source link

Add preview feature #4

Open huytd opened 7 years ago

huytd commented 7 years ago

Ability to preview post before publishing

xRahul commented 7 years ago

As posting here is just creating new md files, can you tell what kind of preview do you have in mind?

huytd commented 7 years ago

During the writing, user must want to see the preview of his work, I think we can create a small web app inside this project to provide user a web page that generate the HTML from Markdown file he is working on.

Just like the Live preview in some editor :D

xRahul commented 7 years ago

Like on stackoverflow/github etc? I think that's doable. I can work on it.. give me some time to check out the relevant packages

huytd commented 7 years ago

OK :D I think we can use Express to create a mini webserver, then use the generate function in generator.js to take the .md file, convert it to HTML data and serve with Express.

xRahul commented 7 years ago

Actually, I have something like this in mind- https://github.com/evilstreak/markdown-js

huytd commented 7 years ago

We already have the markdown converter library here https://github.com/huytd/azeroth-js/blob/master/js/marked.js

xRahul commented 7 years ago

Cool.. we can create a page for writing markdown using that itself then. How about a page which helps create a md file for the post?