Giter Site home page Giter Site logo

jekyll-pandoc-plugin's Introduction

Jekyll Plugin for Using Pandoc-Ruby

This is a plugin for using pandoc as your markdown converter in jekyll.

I am No Longer Maintaining This

I switched to using Hakyll a year or two ago, and stopped using this plugin. In the meantime, Jekyll has gone through some major updates. There are two reasonable sounding pull requests, aimed at making the plugin work with recent updates. I am not going to pull them, because I cannot test them, and I don't want to pretend to maintain something that I am not really maintaining.

You should probably use one of the more up-to-date forks instead of this repo.

Warnings for Existing Users

Jekyll < 1.0.0

Thanks to @ivotron, the plugin has been rewritten to work with Jekyll 1.0.0. The old version, which works with Jekyll < 1.0.0, can be found on the for-use-with-jekyll-pre-1.0.0 branch.

HTML5

After this recent commit the plugin uses pandoc's html5 output by default instead of html. This may break your existing CSS styling. See the Configuration section if you'd like to go back to using html output.

Installation

The plugin depends on the pandoc-ruby gem, which in turn depends on pandoc. You can install pandoc-ruby with:

gem install pandoc-ruby

To install this plugin, copy pandoc_markdown.rb into the _plugins directory in your site source root (if no _plugins directory exists, create it.)

Configuration

To tell jekyll to use pandoc to convert markdown, add the following line to your _config.yml.

markdown: pandoc

This plugin supports two configuration options for pandoc. Specify them both in the pandoc section of your _config.yml.

  • format - the output format to use, e.g., html5 (default) and html.
  • extensions - A list or hash of pandoc extensions to enable.

If none of the extensions you're using take arguments, then extensions can be a list:

pandoc:
  format: html5
  extensions: [smart, mathjax]

If an extention takes options, make extensions a hash that maps each extension name to its argument.

pandoc:
  format: html
  extensions:
    - smart
    - csl: 'apa.csl'
    - bibliography: 'references.bib'

Github Pages

The plugin will not work with github pages. If you set markdown: pandoc in your _config.yml, github pages will ignore this setting, and the default markdown converter will be used.

I use github pages to mirror my official site. My official site is built by jekyll using pandoc. I want my github mirror to be built using rdiscount, and I don't want to maintain two separate _config.yml files. My _config.yml file contains lines that look like this:

markdown:  rdiscount
pandoc:
   extensions: [smart, mathjax]

The plugin sees that the pandoc option has been set, and so uses pandoc. Github pages ignores the pandoc option, and sees that markdown has been set to rdiscount. To get the same effect, but without passing any options to pandoc, try

markdown:  rdiscount
pandoc:  true

jekyll-pandoc-plugin's People

Contributors

dsanson avatar ivotron avatar seliopou avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.