greyblake/blogo

Markdown?

alexwiththescar opened this issue · 4 comments

Hi, Sorry if im being slow here, but I cant get it to render markdown. Are there any Docs covering it?

Set it in in initilizers to :markdown, set Ckeditor to false. What am I missing?

Many Thanks.

Hi, @alexwiththescar
Please make sure, you have redcarpet in you Gemfile.
Meanwhile do you have any errors when you save a post?

It does not help, could you please create a tiny post like:

## Test it out

And go to rails console and do:

Blogo::Post.last 

So actually I wonder, what Blogo::Post.last returns.

Thanks for using Blogo)

Hi Sergey,

Have Redcarpet.

Post Creates fine with no errors.

If i call it up in Console, the only thing out is that :markup_lang is HTML. I have tried editing this in console to "markdown" but did not make a difference. Test post looks like this...

=> #<Blogo::Post id: 1, user_id: 1, permalink: "test-ing", title: "Test ing", published: true, published_at: "2015-10-06 10:32:21", markup_lang: "html", raw_content: "## Test it out\r\n\r\n", html_content: "## Test it out\r\n\r\n", html_overview: nil, tags_string: nil, meta_description: "## Test it out", meta_image: nil, created_at: "2015-10-06 10:32:21", updated_at: "2015-10-06 10:32:21">

Any clues?

Many thanks for you help, and great gem by the way!

Ok, Im just working on why but I found a fix.

Edit the gem config at
blogo/lib/blogo/config.rb

Set :markdown as the default and it will work as expected.

Suggests it did not pull my initialiser settings through, which is strange because it did disable the CKeditor from my initialiser file!

@alexwiththescar I am glad to help! Nice that it works.
Yes, there is an idea to have select in UI to select format of blog post, it's not implemented yet.