Merge pull request #2622 from alfredxing/fix-markdown-docs

This commit is contained in:
Parker Moore 2014-07-22 10:39:50 -04:00
commit d0faba12a3
2 changed files with 3 additions and 85 deletions

View File

@ -9,82 +9,10 @@ permalink: /docs/extras/
There are a number of (optional) extra features that Jekyll supports that you
may want to install, depending on how you plan to use Jekyll.
## LaTeX Support
## Math Support
Maruku comes with optional support for LaTeX to PNG rendering via blahtex
(Version 0.6) which must be in your `$PATH` along with `dvips`.
Kramdown comes with optional support for LaTeX to PNG rendering via [MathJax](http://www.mathjax.org/) within math blocks. See the Kramdown documentation on [math blocks](http://kramdown.gettalong.org/syntax.html#math-blocks) and [math support](http://kramdown.gettalong.org/converter/html.html#math-support) for more details.
## Alternative Markdown Processors
While Jekyll defaults to using Maruku for Markdown conversion, you may use one
of the other three pre-defined markdown parsers or define your own.
### RDiscount
If you prefer to use [RDiscount](https://github.com/rtomayko/rdiscount) instead
of [Maruku](https://github.com/bhollis/maruku) for Markdown, just make sure you have
it installed:
{% highlight bash %}
$ [sudo] gem install rdiscount
{% endhighlight %}
And then specify RDiscount as the Markdown engine in your `_config.yml` file to
have Jekyll run with that option.
{% highlight yaml %}
# In _config.yml
markdown: rdiscount
{% endhighlight %}
### Kramdown
You can also use [Kramdown](http://kramdown.gettalong.org/) instead of Maruku
for Markdown. Make sure that Kramdown is installed:
{% highlight bash %}
$ [sudo] gem install kramdown
{% endhighlight %}
Then you can specify Kramdown as the Markdown engine in `_config.yml`.
{% highlight yaml %}
# In _config.yml
markdown: kramdown
{% endhighlight %}
Kramdown has various options for customizing the HTML output. The
[Configuration](/docs/configuration/) page lists the default options used by
Jekyll. A complete list of options is also available on the [Kramdown
website](http://kramdown.gettalong.org/options.html).
### User-Defined
So, you're totally at odds with our four built-in markdown parsers, eh? No
sweat. You can define one as a plugin:
{% highlight ruby %}
require 'jekyll'
require 'some_renderer'
class Jekyll::Converters::Markdown::MyCustomParser
def initialize(config)
@site_config = config
end
def convert(content)
# (this _must_ return the resulting String after the rendering)
SomeRenderer.new(@site_config).to_html(content)
end
end
{% endhighlight %}
Once you've got that setup, ask Jekyll to use your custom markdown parser in
your `_config.yml` file:
{% highlight yaml %}
markdown: MyCustomParser
{% endhighlight %}
(Note that this **is case-sensitive**, and is only the piece after
`Jekyll::Converters::Markdown`.) And there you are!
See the Markdown section on the [configuration page](/docs/configuration/#markdown-options) for instructions on how to use and configure alternative Markdown processors, as well as how to create [custom processors](/docs/configuration/#custom-markdown-processors).

View File

@ -119,16 +119,6 @@ Firefox and possibly other browsers and is [discouraged in
XHTML.](http://www.w3.org/TR/xhtml1/#C_3) An easy fix is to put a space
between the opening and closing tags.
### RedCloth
Versions 4.1.1 and higher do not obey the notextile tag. [This is a known
bug](http://aaronqian.com/articles/2009/04/07/redcloth-ate-my-notextile.html)
and will hopefully be fixed for 4.2. You can still use 4.1.9, but the
test suite requires that 4.1.0 be installed. If you use a version of
RedCloth that does not have the notextile tag, you may notice that
syntax highlighted blocks from Pygments or Rouge are not formatted
correctly, among other things. If youre seeing this just install 4.1.0.
### Liquid
The latest version, version 2.0, seems to break the use of `{{ "{{" }}` in