No commit activity in last 3 years
No release in over 3 years
Markdown template handler for ruby on rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 5.0
~> 10.0

Runtime

 Project Readme

Rails Markdown Handler

Adds markdown template handling to rails using the Redcarpet gem.

RailsMarkdownHandler will also parses ERB and embeded HTML.

Installation

gem "markdown_handler"
$ bundle install

Usage

app/config/routes.rb

get "/example", to: "pages#example"

app/controllers/pages_controller.rb

class PagesController < ApplicationController
  def example
  end
end

app/views/pages/example.md

# Posts

<% @posts.each do |post| %>
  ## <%= post.title %>
  <%= post.body %>
<% end %>

Configuration

You can configure the redcarpet renderer using an initializer.

# app/config/initializers/markdown.rb
MarkdownHandler.configure do |config|
  config[:autolink] = false
end