jekylltextileredcloth

How to pass parameters to RedCloth (Textile processor) from Jekyll


The RedCloth FAQ describes using the fold_lines option to disable hard breaks. What's the easiest way to pass fold_lines to RedCloth when it's called as part of Jekyll's build process?

(am I just missing something in the Jekyll configuration guide?


Solution

  • In your _config.yml file, you can use :

    redcloth:
      hard_breaks: false
    

    From Jekyll converters:textile.rb

    # List of attributes defined on RedCloth
    # (from https://github.com/jgarber/redcloth/blob/master/lib/redcloth/textile_doc.rb)
    attrs = ['filter_classes', 'filter_html', 'filter_ids', 'filter_styles',
                'hard_breaks', 'lite_mode', 'no_span_caps', 'sanitize_html']