Markdown problem in v6-7?

7 views
Skip to first unread message

Andy Buckley

unread,
May 31, 2015, 5:19:43 PM5/31/15
to nikola-...@googlegroups.com
Hi,

I'm new to Nikola, and trying to migrate an old, dead Radiant CMS site to it. The Radiant site was using Markdown formatting, so I need to get Nikola to render those old pages from MD rather than reST. But it doesn't see to be working, and when I try "nikola new_post -f markdown" to get an example .md post file, I get this:

[2015-05-31T21:08:17Z] ERROR: new_post: Can't find a way, using your configuration, to create a post in format markdown. You may want to tweak COMPILERS or POSTS in conf.py

This is with an out-of-the-box Nikola 7.4.1 installation, and I had the same problem with the v6 .deb package in Ubuntu 14.10. I don't see any obvious problem in the conf.py file, and since I don't find a "markdown" plugin in the website's list, I guess Markdown is meant to be a "core" supported format? (Or did I just miss the appropriate plugin?) A quick search of the group archive indicates that Markdown was last mentioned here in April last year, so is it possible that it's been broken in releases since then and no-one yet noticed?

Thanks!
Andy

Gour

unread,
Jun 1, 2015, 1:39:43 AM6/1/15
to nikola-...@googlegroups.com

Andy Buckley <purit...@gmail.com> writes:

> [2015-05-31T21:08:17Z] ERROR: new_post: Can't find a way, using your
> configuration, to create a post in format markdown. You may want to tweak
> COMPILERS or POSTS in conf.py

You should have something like:

COMPILERS = {
"markdown": ('.md', '.mdown', '.markdown'),
"html": ('.html', '.htm'),
}

POSTS = (
("posts/*.md", "posts", "post.tmpl"),
("posts/*.html", "posts", "post.tmpl"),
)
PAGES = (
("stories/*.md", "stories", "story.tmpl"),
("stories/*.html", "stories", "story.tmpl"),
)

and:

pip install markdown


Otherwise, I recommend to use rst - I was considering to use Asciidoc, but
rst is simply 1st class citizen within Nikola.


Sincerely,
Gour

--
A person who is not disturbed by the incessant flow of
desires — that enter like rivers into the ocean, which is
ever being filled but is always still — can alone achieve
peace, and not the man who strives to satisfy such desires.

Rill

unread,
Jun 1, 2015, 4:18:18 PM6/1/15
to nikola-...@googlegroups.com
Andy, you may need to install the extras for Nikola or possibly get the appropriate python markdown package. I also think there is a markdown package in Ubuntu.
Rill
--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andy Buckley

unread,
Jun 1, 2015, 7:06:56 PM6/1/15
to nikola-...@googlegroups.com
On 01/06/15 06:39, Gour wrote:
>
> Andy Buckley <purit...@gmail.com> writes:
>
>> [2015-05-31T21:08:17Z] ERROR: new_post: Can't find a way, using your
>> configuration, to create a post in format markdown. You may want to tweak
>> COMPILERS or POSTS in conf.py
>
> You should have something like:
>
> COMPILERS = {
> "markdown": ('.md', '.mdown', '.markdown'),
> "html": ('.html', '.htm'),
> }
>
> POSTS = (
> ("posts/*.md", "posts", "post.tmpl"),
> ("posts/*.html", "posts", "post.tmpl"),
> )
> PAGES = (
> ("stories/*.md", "stories", "story.tmpl"),
> ("stories/*.html", "stories", "story.tmpl"),
> )

Aha, the latter two are what I was missing: not yet knowing the conf
file in detail I just failed to noticed the absence of a .md tuple
there, assuming that the COMPILERS dict entry would be enough. Thanks!

> Otherwise, I recommend to use rst - I was considering to use Asciidoc, but
> rst is simply 1st class citizen within Nikola.

I'll do that from now on -- thanks for the input.

Andy

Reply all
Reply to author
Forward
0 new messages