# coding: utf-8
load 'pandoc.rb'
require 'erb'
require 'date'
$license_urls = {
"CC BY-SA-3.0" => 'https://creativecommons.org/licenses/by-sa/3.0/',
'WTFPL-2' => "http://www.wtfpl.net/txt/copying/",
}
$person_uris = {
"Luke Shumaker" => "https://lukeshu.com/",
}
$person_emails = {
"Luke Shumaker" => "lukeshu@sbcglobal.net",
}
class Person
def initialize(name)
@name = name
end
def name
@name
end
def uri
$person_uris[@name]
end
def email
$person_emails[@name]
end
def html
if not email.nil?
return "#{name}"
elsif not uri.nil?
return "#{name}"
else
return @name
end
end
def atom
ret = ""
ret += "
The content of this page is Copyright © #{date.year unless date.nil?} #{author.html}.
\n" + "This page is licensed under the #{license.html} license.
" end def breadcrumbs @breadcrumbs ||= 'Luke Shumaker » ' + ( (slug == 'index') ? "blog" : "blog » #{slug}" ) end end def html_escape(html) html .gsub('&', '&') .gsub('>', '>') .gsub('<', '<') end