module Twine2jekyll
Constants
- VERSION
Public Class Methods
generate_layout(filename)
click to toggle source
# File lib/twine2jekyll.rb, line 12 def self.generate_layout(filename) content = <<EOF <!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <section> {{ content }} </section> </body> </html> EOF File.write(filename, content) end
markdownify(content)
click to toggle source
# File lib/twine2jekyll.rb, line 5 def self.markdownify(content) r = /\[\[([^\]]+)\]\]/ content.gsub!(r, '[\1](\1)') content = "---\nlayout: page\n---\n" + content content end