Sha256: 7ceb175dc895a0be261b2a2b152fdfd4079c2133309237a0aad745d07ffe9f96

Contents?: true

Size: 615 Bytes

Versions: 3

Compression:

Stored size: 615 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

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

3 entries across 3 versions & 1 rubygems

Version Path
vmail-0.1.1 website/gen.rb
vmail-0.0.9 website/gen.rb
vmail-0.0.8 website/gen.rb