forked from hallison/postview
/
postview.rb
68 lines (58 loc) · 1.98 KB
/
postview.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Copyright (c) 2009 Hallison Batista
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__))
# Postview - The minimalist blogware and static page generator.
#
# == Configuration
#
# After create your blog, edit <tt>config/settings.yml</tt> file.
#
# *site*:: Attributes for your site.
# * *title*
# * *subtitle*
# * *author*
# * *email*
# * *domain* for connect by FTP.
# * *directory*, remote. This attribute will be used to synchronize your posts.
# * *theme*
# *sections*:: Attributes for sections (routes) used in site.
# * *root* for main section
# * *posts*
# * *tags*
# * *archive*
# * *drafts*
# * *search*
# * *about*
# *directories*:: Attributes for paths to post files.
# * *posts*
# * *archive*
# * *drafts*
#
# == Themes
#
# Default theme is generated in <tt>themes/default</tt>. Change or migrate your favorite
# theme.
#
module Postview
# RubyGems.
require 'rubygems'
# Core requires.
require 'optparse'
require 'pathname'
require 'ostruct'
# 3rd part libraries/projects.
require 'sinatra/base' unless defined? ::Sinatra::Base
require 'sinatra/mapping' unless defined? ::Sinatra::Mapping
require 'postage' unless defined? ::Postage
# Internal requires
require 'postview/patches' if RUBY_VERSION < "1.8.7"
ROOT = Pathname.new("#{File.dirname(__FILE__)}/..").expand_path
PATH = Pathname.new(".").expand_path
# Auto-load all internal requires.
autoload :About, 'postview/about'
autoload :Version, 'postview/version'
autoload :Settings, 'postview/settings'
autoload :Site, 'postview/site'
autoload :Helpers, 'postview/helpers'
autoload :Application, 'postview/application'
autoload :CLI, 'postview/cli'
end # module Postview