{"repo":"zarqman/markdown_views","free":true,"listed":false,"github":"https://github.com/zarqman/markdown_views","clone":"git clone https://github.com/zarqman/markdown_views.git","description":"Makes Rails handle .md templates, with optional preprocessing of ERB, HAML, etc. Easily configurable; uses CommonMarker & Rouge.","language":"CSS","stars":19,"topics":["ruby","gem","markdown","rails"],"license":"MIT","category":"productivity","readme_excerpt":"MarkdownViews MarkdownViews enables Rails to process .md templates as part of app/views/ , with optional preprocessing of ERB, HAML, etc. A markdown() helper is also provided for when you need Markdown for only part of a view. It uses CommonMarker for markdown processing and Rouge for syntax highlighting. Usage: Views Just create views as some action.html.md instead of some action.html.erb and write them with Markdown instead of HTML. You can still use ERB (or HAML, etc -- see below). # My page title Hello, . Usage: Helper MarkdownViews also includes a simple Markdown rendering helper. ## Some markdown text Configuration By default, all HTML comments are stripped from the output. Occasionally this can cause issues with inline Javascript or otherwise be undesired. To disable, add the following to an initializer: MarkdownViews.strip comments = false By default, all .md files are preprocessed with ERB (making them effectively .md.erb files). This can be changed or disabled by setting a different template handler or setting to nil, respectively. MarkdownViews.preprocessor = :erb MarkdownViews.preprocessor = nil CommonMarker's rendering can also be configured. See CommonMarker's documentation for available options. MarkdownViews.parsing opts.merge! smart: false MarkdownViews.rendering opts.merge! unsafe: false MarkdownViews.extensions.merge! tasklist: true Likewise, Rouge can be configured: # Use inline formatting: MarkdownViews.rouge opts.merge! formatter: Rouge::Formatters::HTML","default_branch":null,"files":null,"tree":[],"storefront":"/r/zarqman","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zarqman/markdown_views/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}