0.0
No commit activity in last 3 years
No release in over 3 years
maruku_snippet adds the to_html_snippet(lines) method. All existing features of Maruku are delegated to Maruku.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.6.0
 Project Readme

maruku-snippet

Extends MaRuKu markdown parsing to adding .to_html_snippet(lines).
A simpe way to generate document previews with out breaking links.

This might be useful for you main blog roll page to show a paragraph from your last 10 posts, each followed by a read more link

Install

gem install maruku_snippet

Usage

This just addes the to_html_snippet(lines) method to maruku, everything else stays the same.

require 'maruku_snippet'

doc = MarukuSnippet.new(markdown_string)
puts doc.to_html_snippet(10)

Maruku would be:

require 'maruku'

doc = Maruku.new(markdown_string)
puts doc.to_html

Markdown Syntax

For syntax see DaringFireball.