Sha256: 884def41c3cda0fe343178e78aed956bfe0b01ec3e3bbd196a12ffb9937ffae5

Contents?: true

Size: 710 Bytes

Versions: 34

Compression:

Stored size: 710 Bytes

Contents

require 'liquid'
require 'rdiscount'

top = RDiscount.new(File.read("top.markdown")).to_html

readme = File.expand_path("../../README.markdown", __FILE__)

raise "no README" unless File.size?(readme)

middle_markdown = File.read(readme).split(/^\s*$/)

middle_markdown = middle_markdown[2..-1].join("\n\n")

middle = RDiscount.new(middle_markdown).to_html
# for some reason markdown inserts extra blank lines
middle = middle.gsub(/\n\n{3,}/, "\n\n")


bottom = RDiscount.new(File.read("bottom.markdown")).to_html

content = [top, middle, bottom].join("\n\n")

template = File.read("vmail-template.html")
out = Liquid::Template.parse(template).render 'content' => content, 'timestamp' => Time.now.to_i
puts out

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
vmail-0.4.7 website/gen.rb
vmail-0.4.6 website/gen.rb
vmail-0.4.5 website/gen.rb
vmail-0.4.4 website/gen.rb
vmail-0.4.3 website/gen.rb
vmail-0.4.2 website/gen.rb
vmail-0.4.1 website/gen.rb
vmail-0.4.0 website/gen.rb
vmail-0.3.9 website/gen.rb
vmail-0.3.8 website/gen.rb
vmail-0.3.7 website/gen.rb
vmail-0.3.6 website/gen.rb
vmail-0.3.5 website/gen.rb
vmail-0.3.3 website/gen.rb
vmail-0.3.2 website/gen.rb
vmail-0.3.1 website/gen.rb
vmail-0.3.0 website/gen.rb
vmail-0.2.8 website/gen.rb
vmail-0.2.7 website/gen.rb
vmail-0.2.6 website/gen.rb