Reputation: 10893
What do I need to do to make syntax highlighting work on octopress? Here's what I currently have:
``` ruby
class Fixnum
def prime?
('1' * self) !~ /^1?$|^(11+?)\1+$/
end
end
```
There's no whitespace on the left side of the backtick and I place a single whitespace between the leftmost part of the editor and the code which I want to be highlighted.
I also tried codeblocks but no luck even if I already copy pasted the example on their site:
{% codeblock lang:objc %}
[rectangle setX: 10 y: 10 width: 20 height: 20];
{% endcodeblock %}
Is there anything else that I need to install? I believe codeblocks and backticks are already included when I installed octopress. But it still looks like this even if I include the language:
Any ideas?
Upvotes: 3
Views: 3283
Reputation: 21863
Have you solved your issue?
If not, you can try using different markdown engines (default is rdiscount + pygments).
Other possible engines are kramdown, redcarpet and maruku, which use ruby instead of python, so if you have issues with python this might solve them.
I wrote a blog post about how to set up kramdown with Octopress, you can check it out.
Upvotes: 3
Reputation: 1384
<figure>
and <figcaption>
and optional download links. Octopress Sharing Code Snippets
Upvotes: 2