-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.rb
33 lines (27 loc) · 909 Bytes
/
blog.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# encoding: utf-8
%w(camping/ar camping/session image_science lib/common feedzirra).each { |lib| require lib }
# Fix unicode urls
$KCODE = 'u'
Camping.goes :Blog
module Blog; VERSION = 0.99
include Camping::Session
PATH = File.expand_path(File.dirname(__FILE__)) + '/blog'
def self.create
Blog::Models.create_schema :assume => (Blog::Models::Post.table_exists? ? 1.0 : 0.0)
ActiveRecord::Base.default_timezone = :utc
end
#TODO: Used? If so, change so HTML 4, otherwise drop this code
# beautiful XHTML 11
class Mab
def xhtml11(&block)
self.tagset = Markaby::XHTMLStrict
declare! :DOCTYPE, :html, :PUBLIC, '-//W3C//DTD XHTML 1.1//EN', 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'
tag!(:html, :xmlns => 'http://www.w3.org/1999/xhtml', 'xml:lang' => 'en', &block)
self
end
end
end
require 'blog/m'
require 'blog/c'
require 'blog/h'
require 'blog/v'