avatar

Next MarkDownBlog Updates


10-02-2015 09:19 by depado

Next Updates


As you may have seen on this article, I have ideas for this blog platform. Some are easy to implement, some are not. That's why I'd like to concentrate first on some useful features and not on the backend for now.

Usage and Clarity

As you may have seen, it's not easy to write raw markdown without having a preview of what you're doing. That's why the next step should be to implement a preview thing on the new article page. This won't be as complicated as I thought. I'll add a button that splits the page in two columns, one with the editor, the other with the preview, loaded in ajax on click of the refresh button. Optionnally I'll add a keyboard binding to refresh more easily the preview. That will require a few more learning of javascript. This will of course also apply on the edit page.

Also about the editor, I'd like to fix the size of the textarea. For now you can see about 3 lines of text when landing on the edit or new article page. I'd like to make it unresizeable, and take the full height of the window. Don't know how to do so yet, but I'll look into that direction as it would improve user experience. (No I don't plan on adding a rich-text editor like TinyMCE or whatever. I don't like those)

Further Customization of UI

There is a point I like to work on, and that's the customization of the UI. A lot could be done on that point. For example, if you don't want to display your articles in bootstrap panel, or change the color of the heading, disable buttons, make some articles private... Private articles is something I'd like to work on soon. For example you could tell that this article can not be seen on your blog homepage (index). That would introduce another concept of per-article settings. I should really work on that, but that will require some time to think and mature the idea.

For people using the syntax highlighting feature, I'd also like to allow you to choose a color scheme for your entire blog. For now it uses the monokai theme. But maybe some people don't want to use that color scheme to show their code ? I don't know. That's a feature I'd like to have hehe.

New Features ?

Except the things I said above, I'd like to introduce new features like comments on articles using disqus for example.

Planned Releases

I don't know if I'll have a lot of time to work on it, even if I have the motivation. There will be an update before the end of the week, probably with the markdown preview with fixed textarea size and customization of syntax highlighter blog wide. For the rest, no idea when I'll have enough time to code hehe.


Preview Feature is live !

The preview feature is now live ! Tell me what you think of it ! It actually didn't take too long. Most of the time I spent on this was about designing the html and the ui.

$("#click-preview").click(function () {
    $.ajax({
        type : "POST",
        url : "{{ url_for('ajax_markdown_parser') }}",
        data: JSON.stringify($("#{{form.content.id}}").val(), null, '\t'),
        contentType: 'application/json',
        success: function(result) {
            $('#previewmodal').modal();
            $('#preview_title').html("<h4>" + $("#{{ form.title.id }}").val() + "</h4>");
            $("#preview_body").html(result);
        }
    });
    return false;
});
@app.route("/_parse", methods=['POST'])
def ajax_markdown_parser():
    return markdown_renderer.render(request.json)

Quick Update About Tables !

Now Tables Are Fine
Can You Actually See
What I Mean ?

Now go get some fun using tables !