Using Maruku with Marked
Hi there,
I run a website using jekyll, and only have maruku available on my remote server. As such I'd like to have Marked use Maruku so that I can see what I'll be getting, but try as I might, I can't get it to work. Currently I have the path to Maruku and the argument --html specified, but although Marked sees the file, and has the correct word count, the output is null both in the preview and in the html. Any pointers?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 20 Apr, 2012 12:14 AM
First, take a look at system.log in Console.app while you refresh the preview and see if any com.brettterpstra.marky errors show up there. That might help you find the issue pretty quickly.
If Marked has a problem with finding the file or running it, it reverts to the built-in processor, so the fact that you're getting a blank preview means something's going on with Maruku. Are you running rvm at all? Marked doesn't currently honor rvm settings, so it's likely running your system default (which may not be compatible with your version of maruku).
Let me know about the console and rvm, we can troubleshoot from there.
2 Posted by david.pw.smith on 20 Apr, 2012 01:04 AM
Ah, you've hit the nail on the head with the RVM thing. I'm not the most ruby-fluent of customers, I'm more interested in jekyll for its allowing me to use markdown and html with nothing in the way!
I have fixed the problem using a combination of this:
and this, borrowed from here:
Thanks for your time, I'll perhaps have a go at whacking this into some sort of more universal format and then stick a link on here.
Dave
Support Staff 3 Posted by Brett on 20 Apr, 2012 01:44 AM
Haven't tested it, but you could try something like this to narrow it down to one script:
If that works, let me know and I'll add a page to the knowledgebase for it.
4 Posted by david.pw.smith on 20 Apr, 2012 08:54 AM
That doesn't work, I'm afraid, and I think those two lines would be redundant, since those environment variables are set in /usr/bin/env. It seems like Marked (or OSX?) doesn't follow the variables set in the shebang /usr/bin/env...
Support Staff 5 Posted by Brett on 20 Apr, 2012 12:00 PM
It should, but it's basically spawning an entirely new shell outside of your user login, so it's possible it's loading a blank environment. If what you have is working, great, I'll mention the two-file trick in the FAQ instead, then :).
david.pw.smith closed this discussion on 14 Jan, 2015 06:06 PM.