henshin 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/.yardoc/checksums +12 -0
- data/.yardoc/objects/Hash.dat +0 -0
- data/.yardoc/objects/Hash/to_options_i.dat +0 -0
- data/.yardoc/objects/Henshin.dat +0 -0
- data/.yardoc/objects/Henshin/CSSGenerator.dat +0 -0
- data/.yardoc/objects/Henshin/CSSGenerator/generate_i.dat +0 -0
- data/.yardoc/objects/Henshin/Defaults.dat +0 -0
- data/.yardoc/objects/Henshin/Gen.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/config_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/config_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/content_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/content_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/date_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/date_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/extension_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/extension_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/initialize_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/layout_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/layout_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/override_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/path_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/path_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/payload_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/process_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/read_yaml_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/render_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/site_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/site_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/title_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/title_i.dat +0 -0
- data/.yardoc/objects/Henshin/Gen/write_i.dat +0 -0
- data/.yardoc/objects/Henshin/HTMLGenerator.dat +0 -0
- data/.yardoc/objects/Henshin/HTMLGenerator/generate_i.dat +0 -0
- data/.yardoc/objects/Henshin/JSGenerator.dat +0 -0
- data/.yardoc/objects/Henshin/JSGenerator/generate_i.dat +0 -0
- data/.yardoc/objects/Henshin/LayoutParser.dat +0 -0
- data/.yardoc/objects/Henshin/LayoutParser/generate_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post.dat +0 -0
- data/.yardoc/objects/Henshin/Post/author_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/author_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/category_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/category_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/date_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/date_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/initialize_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/override_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/payload_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/permalink_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/process_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/read_name_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/read_yaml_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/tags_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/tags_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/title_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/title_i.dat +0 -0
- data/.yardoc/objects/Henshin/Post/write_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site.dat +0 -0
- data/.yardoc/objects/Henshin/Site/archives_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/archives_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/categories_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/categories_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/config_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/config_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/gens_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/gens_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/initialize_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/layouts_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/layouts_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/payload_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/plugins_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/plugins_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/posts_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/posts_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/process_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/read_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/read_layouts_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/read_others_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/read_posts_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/render_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/reset_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/statics_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/statics_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/tags_3D_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/tags_i.dat +0 -0
- data/.yardoc/objects/Henshin/Site/write_i.dat +0 -0
- data/.yardoc/objects/Henshin/StandardPlugin.dat +0 -0
- data/.yardoc/objects/Henshin/configure_c.dat +0 -0
- data/.yardoc/objects/Henshin/extensions_c.dat +0 -0
- data/.yardoc/objects/Henshin/load_plugins_c.dat +0 -0
- data/.yardoc/objects/LiquidPlugin.dat +0 -0
- data/.yardoc/objects/LiquidPlugin/extensions_3D_i.dat +0 -0
- data/.yardoc/objects/LiquidPlugin/extensions_i.dat +0 -0
- data/.yardoc/objects/LiquidPlugin/generate_i.dat +0 -0
- data/.yardoc/objects/LiquidPlugin/initialize_i.dat +0 -0
- data/.yardoc/objects/LiquidPlugin/read_i.dat +0 -0
- data/.yardoc/objects/MarukuPlugin.dat +0 -0
- data/.yardoc/objects/MarukuPlugin/extensions_3D_i.dat +0 -0
- data/.yardoc/objects/MarukuPlugin/extensions_i.dat +0 -0
- data/.yardoc/objects/MarukuPlugin/generate_i.dat +0 -0
- data/.yardoc/objects/MarukuPlugin/initialize_i.dat +0 -0
- data/.yardoc/objects/PygmentsPlugin.dat +0 -0
- data/.yardoc/objects/PygmentsPlugin/extensions_3D_i.dat +0 -0
- data/.yardoc/objects/PygmentsPlugin/extensions_i.dat +0 -0
- data/.yardoc/objects/PygmentsPlugin/generate_i.dat +0 -0
- data/.yardoc/objects/PygmentsPlugin/initialize_i.dat +0 -0
- data/.yardoc/objects/SassPlugin.dat +0 -0
- data/.yardoc/objects/SassPlugin/extensions_3D_i.dat +0 -0
- data/.yardoc/objects/SassPlugin/extensions_i.dat +0 -0
- data/.yardoc/objects/SassPlugin/generate_i.dat +0 -0
- data/.yardoc/objects/SassPlugin/initialize_i.dat +0 -0
- data/.yardoc/objects/String.dat +0 -0
- data/.yardoc/objects/String/directory_i.dat +0 -0
- data/.yardoc/objects/String/extension_i.dat +0 -0
- data/.yardoc/objects/String/file_name_i.dat +0 -0
- data/.yardoc/objects/String/slugify_i.dat +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +2 -0
- data/LICENSE +20 -0
- data/README.markdown +73 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/bin/henshin +31 -0
- data/doc/Hash.html +179 -0
- data/doc/Henshin.html +479 -0
- data/doc/Henshin/CSSGenerator.html +186 -0
- data/doc/Henshin/Gen.html +1225 -0
- data/doc/Henshin/HTMLGenerator.html +186 -0
- data/doc/Henshin/JSGenerator.html +182 -0
- data/doc/Henshin/LayoutParser.html +186 -0
- data/doc/Henshin/Post.html +1159 -0
- data/doc/Henshin/Site.html +1462 -0
- data/doc/Henshin/StandardPlugin.html +99 -0
- data/doc/LiquidPlugin.html +399 -0
- data/doc/MarukuPlugin.html +325 -0
- data/doc/PygmentsPlugin.html +325 -0
- data/doc/SassPlugin.html +325 -0
- data/doc/String.html +371 -0
- data/doc/_index.html +239 -0
- data/doc/class_list.html +36 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +50 -0
- data/doc/css/style.css +273 -0
- data/doc/file.README.html +131 -0
- data/doc/file_list.html +38 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +131 -0
- data/doc/js/app.js +111 -0
- data/doc/js/full_list.js +117 -0
- data/doc/js/jquery.js +19 -0
- data/doc/method_list.html +611 -0
- data/doc/top-level-namespace.html +89 -0
- data/henshin.gemspec +224 -0
- data/lib/henshin.rb +74 -0
- data/lib/henshin/ext.rb +42 -0
- data/lib/henshin/gen.rb +89 -0
- data/lib/henshin/plugin.rb +43 -0
- data/lib/henshin/plugins/liquid.rb +27 -0
- data/lib/henshin/plugins/maruku.rb +16 -0
- data/lib/henshin/plugins/pygments.rb +15 -0
- data/lib/henshin/plugins/sass.rb +16 -0
- data/lib/henshin/post.rb +127 -0
- data/lib/henshin/site.rb +112 -0
- data/test/helper.rb +10 -0
- data/test/site/_site/2010/10/20-testing-stuff/index.html +24 -0
- data/test/site/_site/2010/5/15-lorem-ipsum/index.html +24 -0
- data/test/site/_site/index.html +29 -0
- data/test/site/index.html +12 -0
- data/test/site/layouts/main.html +15 -0
- data/test/site/layouts/post.html +24 -0
- data/test/site/options.yaml +11 -0
- data/test/site/posts/Testing-Stuff.markdown +7 -0
- data/test/site/posts/lorem-ipsum.markdown +7 -0
- data/test/test_henshin.rb +7 -0
- metadata +261 -0
@@ -0,0 +1,89 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta name="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>Top Level Namespace</title>
|
7
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
+
|
10
|
+
<script type="text/javascript" charset="utf-8">
|
11
|
+
relpath = '';
|
12
|
+
if (relpath != '') relpath += '/';
|
13
|
+
</script>
|
14
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
15
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<script type="text/javascript" charset="utf-8">
|
20
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
+
</script>
|
22
|
+
|
23
|
+
<div id="header">
|
24
|
+
<div id="menu">
|
25
|
+
|
26
|
+
<a href="_index.html">Index</a> »
|
27
|
+
|
28
|
+
|
29
|
+
<span class="title">Top Level Namespace</span>
|
30
|
+
|
31
|
+
|
32
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="search">
|
36
|
+
<a id="class_list_link" href="#">Class List</a>
|
37
|
+
<a id="method_list_link" href="#">Method List</a>
|
38
|
+
<a id ="file_list_link" href="#">File List</a>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div class="clear"></div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<iframe id="search_frame"></iframe>
|
45
|
+
|
46
|
+
<div id="content"><h1>Top Level Namespace
|
47
|
+
|
48
|
+
|
49
|
+
</h1>
|
50
|
+
|
51
|
+
<dl class="box">
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
</dl>
|
61
|
+
<div class="clear"></div>
|
62
|
+
|
63
|
+
<h2>Defined Under Namespace</h2>
|
64
|
+
<p class="children">
|
65
|
+
|
66
|
+
|
67
|
+
<strong class="modules">Modules:</strong> <a href="Henshin.html" title="Henshin (module)">Henshin</a>
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
<strong class="classes">Classes:</strong> <a href="Hash.html" title="Hash (class)">Hash</a>, <a href="LiquidPlugin.html" title="LiquidPlugin (class)">LiquidPlugin</a>, <a href="MarukuPlugin.html" title="MarukuPlugin (class)">MarukuPlugin</a>, <a href="PygmentsPlugin.html" title="PygmentsPlugin (class)">PygmentsPlugin</a>, <a href="SassPlugin.html" title="SassPlugin (class)">SassPlugin</a>, <a href="String.html" title="String (class)">String</a>
|
72
|
+
|
73
|
+
|
74
|
+
</p>
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
</div>
|
81
|
+
|
82
|
+
<div id="footer">
|
83
|
+
Generated on Wed May 19 14:45:03 2010 by
|
84
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
85
|
+
0.5.4 (ruby-1.9.1).
|
86
|
+
</div>
|
87
|
+
|
88
|
+
</body>
|
89
|
+
</html>
|
data/henshin.gemspec
ADDED
@@ -0,0 +1,224 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{henshin}
|
8
|
+
s.version = "0.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["hawx"]
|
12
|
+
s.date = %q{2010-05-19}
|
13
|
+
s.default_executable = %q{henshin}
|
14
|
+
s.description = %q{Henshin is a static site generator, with a plugin system and more}
|
15
|
+
s.email = %q{m@hawx.me}
|
16
|
+
s.executables = ["henshin"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README.markdown"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".gitignore",
|
24
|
+
".yardoc/checksums",
|
25
|
+
".yardoc/objects/Hash.dat",
|
26
|
+
".yardoc/objects/Hash/to_options_i.dat",
|
27
|
+
".yardoc/objects/Henshin.dat",
|
28
|
+
".yardoc/objects/Henshin/CSSGenerator.dat",
|
29
|
+
".yardoc/objects/Henshin/CSSGenerator/generate_i.dat",
|
30
|
+
".yardoc/objects/Henshin/Defaults.dat",
|
31
|
+
".yardoc/objects/Henshin/Gen.dat",
|
32
|
+
".yardoc/objects/Henshin/Gen/config_3D_i.dat",
|
33
|
+
".yardoc/objects/Henshin/Gen/config_i.dat",
|
34
|
+
".yardoc/objects/Henshin/Gen/content_3D_i.dat",
|
35
|
+
".yardoc/objects/Henshin/Gen/content_i.dat",
|
36
|
+
".yardoc/objects/Henshin/Gen/date_3D_i.dat",
|
37
|
+
".yardoc/objects/Henshin/Gen/date_i.dat",
|
38
|
+
".yardoc/objects/Henshin/Gen/extension_3D_i.dat",
|
39
|
+
".yardoc/objects/Henshin/Gen/extension_i.dat",
|
40
|
+
".yardoc/objects/Henshin/Gen/initialize_i.dat",
|
41
|
+
".yardoc/objects/Henshin/Gen/layout_3D_i.dat",
|
42
|
+
".yardoc/objects/Henshin/Gen/layout_i.dat",
|
43
|
+
".yardoc/objects/Henshin/Gen/override_i.dat",
|
44
|
+
".yardoc/objects/Henshin/Gen/path_3D_i.dat",
|
45
|
+
".yardoc/objects/Henshin/Gen/path_i.dat",
|
46
|
+
".yardoc/objects/Henshin/Gen/payload_i.dat",
|
47
|
+
".yardoc/objects/Henshin/Gen/process_i.dat",
|
48
|
+
".yardoc/objects/Henshin/Gen/read_yaml_i.dat",
|
49
|
+
".yardoc/objects/Henshin/Gen/render_i.dat",
|
50
|
+
".yardoc/objects/Henshin/Gen/site_3D_i.dat",
|
51
|
+
".yardoc/objects/Henshin/Gen/site_i.dat",
|
52
|
+
".yardoc/objects/Henshin/Gen/title_3D_i.dat",
|
53
|
+
".yardoc/objects/Henshin/Gen/title_i.dat",
|
54
|
+
".yardoc/objects/Henshin/Gen/write_i.dat",
|
55
|
+
".yardoc/objects/Henshin/HTMLGenerator.dat",
|
56
|
+
".yardoc/objects/Henshin/HTMLGenerator/generate_i.dat",
|
57
|
+
".yardoc/objects/Henshin/JSGenerator.dat",
|
58
|
+
".yardoc/objects/Henshin/JSGenerator/generate_i.dat",
|
59
|
+
".yardoc/objects/Henshin/LayoutParser.dat",
|
60
|
+
".yardoc/objects/Henshin/LayoutParser/generate_i.dat",
|
61
|
+
".yardoc/objects/Henshin/Post.dat",
|
62
|
+
".yardoc/objects/Henshin/Post/author_3D_i.dat",
|
63
|
+
".yardoc/objects/Henshin/Post/author_i.dat",
|
64
|
+
".yardoc/objects/Henshin/Post/category_3D_i.dat",
|
65
|
+
".yardoc/objects/Henshin/Post/category_i.dat",
|
66
|
+
".yardoc/objects/Henshin/Post/date_3D_i.dat",
|
67
|
+
".yardoc/objects/Henshin/Post/date_i.dat",
|
68
|
+
".yardoc/objects/Henshin/Post/initialize_i.dat",
|
69
|
+
".yardoc/objects/Henshin/Post/override_i.dat",
|
70
|
+
".yardoc/objects/Henshin/Post/payload_i.dat",
|
71
|
+
".yardoc/objects/Henshin/Post/permalink_i.dat",
|
72
|
+
".yardoc/objects/Henshin/Post/process_i.dat",
|
73
|
+
".yardoc/objects/Henshin/Post/read_name_i.dat",
|
74
|
+
".yardoc/objects/Henshin/Post/read_yaml_i.dat",
|
75
|
+
".yardoc/objects/Henshin/Post/tags_3D_i.dat",
|
76
|
+
".yardoc/objects/Henshin/Post/tags_i.dat",
|
77
|
+
".yardoc/objects/Henshin/Post/title_3D_i.dat",
|
78
|
+
".yardoc/objects/Henshin/Post/title_i.dat",
|
79
|
+
".yardoc/objects/Henshin/Post/write_i.dat",
|
80
|
+
".yardoc/objects/Henshin/Site.dat",
|
81
|
+
".yardoc/objects/Henshin/Site/archives_3D_i.dat",
|
82
|
+
".yardoc/objects/Henshin/Site/archives_i.dat",
|
83
|
+
".yardoc/objects/Henshin/Site/categories_3D_i.dat",
|
84
|
+
".yardoc/objects/Henshin/Site/categories_i.dat",
|
85
|
+
".yardoc/objects/Henshin/Site/config_3D_i.dat",
|
86
|
+
".yardoc/objects/Henshin/Site/config_i.dat",
|
87
|
+
".yardoc/objects/Henshin/Site/gens_3D_i.dat",
|
88
|
+
".yardoc/objects/Henshin/Site/gens_i.dat",
|
89
|
+
".yardoc/objects/Henshin/Site/initialize_i.dat",
|
90
|
+
".yardoc/objects/Henshin/Site/layouts_3D_i.dat",
|
91
|
+
".yardoc/objects/Henshin/Site/layouts_i.dat",
|
92
|
+
".yardoc/objects/Henshin/Site/payload_i.dat",
|
93
|
+
".yardoc/objects/Henshin/Site/plugins_3D_i.dat",
|
94
|
+
".yardoc/objects/Henshin/Site/plugins_i.dat",
|
95
|
+
".yardoc/objects/Henshin/Site/posts_3D_i.dat",
|
96
|
+
".yardoc/objects/Henshin/Site/posts_i.dat",
|
97
|
+
".yardoc/objects/Henshin/Site/process_i.dat",
|
98
|
+
".yardoc/objects/Henshin/Site/read_i.dat",
|
99
|
+
".yardoc/objects/Henshin/Site/read_layouts_i.dat",
|
100
|
+
".yardoc/objects/Henshin/Site/read_others_i.dat",
|
101
|
+
".yardoc/objects/Henshin/Site/read_posts_i.dat",
|
102
|
+
".yardoc/objects/Henshin/Site/render_i.dat",
|
103
|
+
".yardoc/objects/Henshin/Site/reset_i.dat",
|
104
|
+
".yardoc/objects/Henshin/Site/statics_3D_i.dat",
|
105
|
+
".yardoc/objects/Henshin/Site/statics_i.dat",
|
106
|
+
".yardoc/objects/Henshin/Site/tags_3D_i.dat",
|
107
|
+
".yardoc/objects/Henshin/Site/tags_i.dat",
|
108
|
+
".yardoc/objects/Henshin/Site/write_i.dat",
|
109
|
+
".yardoc/objects/Henshin/StandardPlugin.dat",
|
110
|
+
".yardoc/objects/Henshin/configure_c.dat",
|
111
|
+
".yardoc/objects/Henshin/extensions_c.dat",
|
112
|
+
".yardoc/objects/Henshin/load_plugins_c.dat",
|
113
|
+
".yardoc/objects/LiquidPlugin.dat",
|
114
|
+
".yardoc/objects/LiquidPlugin/extensions_3D_i.dat",
|
115
|
+
".yardoc/objects/LiquidPlugin/extensions_i.dat",
|
116
|
+
".yardoc/objects/LiquidPlugin/generate_i.dat",
|
117
|
+
".yardoc/objects/LiquidPlugin/initialize_i.dat",
|
118
|
+
".yardoc/objects/LiquidPlugin/read_i.dat",
|
119
|
+
".yardoc/objects/MarukuPlugin.dat",
|
120
|
+
".yardoc/objects/MarukuPlugin/extensions_3D_i.dat",
|
121
|
+
".yardoc/objects/MarukuPlugin/extensions_i.dat",
|
122
|
+
".yardoc/objects/MarukuPlugin/generate_i.dat",
|
123
|
+
".yardoc/objects/MarukuPlugin/initialize_i.dat",
|
124
|
+
".yardoc/objects/PygmentsPlugin.dat",
|
125
|
+
".yardoc/objects/PygmentsPlugin/extensions_3D_i.dat",
|
126
|
+
".yardoc/objects/PygmentsPlugin/extensions_i.dat",
|
127
|
+
".yardoc/objects/PygmentsPlugin/generate_i.dat",
|
128
|
+
".yardoc/objects/PygmentsPlugin/initialize_i.dat",
|
129
|
+
".yardoc/objects/SassPlugin.dat",
|
130
|
+
".yardoc/objects/SassPlugin/extensions_3D_i.dat",
|
131
|
+
".yardoc/objects/SassPlugin/extensions_i.dat",
|
132
|
+
".yardoc/objects/SassPlugin/generate_i.dat",
|
133
|
+
".yardoc/objects/SassPlugin/initialize_i.dat",
|
134
|
+
".yardoc/objects/String.dat",
|
135
|
+
".yardoc/objects/String/directory_i.dat",
|
136
|
+
".yardoc/objects/String/extension_i.dat",
|
137
|
+
".yardoc/objects/String/file_name_i.dat",
|
138
|
+
".yardoc/objects/String/slugify_i.dat",
|
139
|
+
".yardoc/objects/root.dat",
|
140
|
+
".yardoc/proxy_types",
|
141
|
+
"LICENSE",
|
142
|
+
"README.markdown",
|
143
|
+
"Rakefile",
|
144
|
+
"VERSION",
|
145
|
+
"bin/henshin",
|
146
|
+
"doc/Hash.html",
|
147
|
+
"doc/Henshin.html",
|
148
|
+
"doc/Henshin/CSSGenerator.html",
|
149
|
+
"doc/Henshin/Gen.html",
|
150
|
+
"doc/Henshin/HTMLGenerator.html",
|
151
|
+
"doc/Henshin/JSGenerator.html",
|
152
|
+
"doc/Henshin/LayoutParser.html",
|
153
|
+
"doc/Henshin/Post.html",
|
154
|
+
"doc/Henshin/Site.html",
|
155
|
+
"doc/Henshin/StandardPlugin.html",
|
156
|
+
"doc/LiquidPlugin.html",
|
157
|
+
"doc/MarukuPlugin.html",
|
158
|
+
"doc/PygmentsPlugin.html",
|
159
|
+
"doc/SassPlugin.html",
|
160
|
+
"doc/String.html",
|
161
|
+
"doc/_index.html",
|
162
|
+
"doc/class_list.html",
|
163
|
+
"doc/css/common.css",
|
164
|
+
"doc/css/full_list.css",
|
165
|
+
"doc/css/style.css",
|
166
|
+
"doc/file.README.html",
|
167
|
+
"doc/file_list.html",
|
168
|
+
"doc/frames.html",
|
169
|
+
"doc/index.html",
|
170
|
+
"doc/js/app.js",
|
171
|
+
"doc/js/full_list.js",
|
172
|
+
"doc/js/jquery.js",
|
173
|
+
"doc/method_list.html",
|
174
|
+
"doc/top-level-namespace.html",
|
175
|
+
"henshin.gemspec",
|
176
|
+
"lib/henshin.rb",
|
177
|
+
"lib/henshin/ext.rb",
|
178
|
+
"lib/henshin/gen.rb",
|
179
|
+
"lib/henshin/plugin.rb",
|
180
|
+
"lib/henshin/plugins/liquid.rb",
|
181
|
+
"lib/henshin/plugins/maruku.rb",
|
182
|
+
"lib/henshin/plugins/pygments.rb",
|
183
|
+
"lib/henshin/plugins/sass.rb",
|
184
|
+
"lib/henshin/post.rb",
|
185
|
+
"lib/henshin/site.rb",
|
186
|
+
"test/helper.rb",
|
187
|
+
"test/site/_site/2010/10/20-testing-stuff/index.html",
|
188
|
+
"test/site/_site/2010/5/15-lorem-ipsum/index.html",
|
189
|
+
"test/site/_site/index.html",
|
190
|
+
"test/site/index.html",
|
191
|
+
"test/site/layouts/main.html",
|
192
|
+
"test/site/layouts/post.html",
|
193
|
+
"test/site/options.yaml",
|
194
|
+
"test/site/posts/Testing-Stuff.markdown",
|
195
|
+
"test/site/posts/lorem-ipsum.markdown",
|
196
|
+
"test/test_henshin.rb"
|
197
|
+
]
|
198
|
+
s.homepage = %q{http://github.com/hawx/henshin}
|
199
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
200
|
+
s.require_paths = ["lib"]
|
201
|
+
s.rubygems_version = %q{1.3.6}
|
202
|
+
s.summary = %q{Henshin is a static site generator}
|
203
|
+
s.test_files = [
|
204
|
+
"test/helper.rb",
|
205
|
+
"test/test_henshin.rb"
|
206
|
+
]
|
207
|
+
|
208
|
+
if s.respond_to? :specification_version then
|
209
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
210
|
+
s.specification_version = 3
|
211
|
+
|
212
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
213
|
+
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
214
|
+
s.add_development_dependency(%q<yard>, [">= 0"])
|
215
|
+
else
|
216
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
217
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
218
|
+
end
|
219
|
+
else
|
220
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
221
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
data/lib/henshin.rb
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
$:.unshift File.dirname(__FILE__)
|
2
|
+
|
3
|
+
# standard ruby
|
4
|
+
require 'time'
|
5
|
+
require 'yaml'
|
6
|
+
require 'pp'
|
7
|
+
|
8
|
+
# library
|
9
|
+
require 'henshin/site'
|
10
|
+
|
11
|
+
require 'henshin/gen'
|
12
|
+
require 'henshin/post'
|
13
|
+
#require 'henshin/page'
|
14
|
+
|
15
|
+
require 'henshin/ext'
|
16
|
+
|
17
|
+
|
18
|
+
module Henshin
|
19
|
+
|
20
|
+
# Default options for configuration
|
21
|
+
Defaults = {:title => 'A site',
|
22
|
+
:description => 'No description',
|
23
|
+
:time_zone => 'GMT',
|
24
|
+
:author => '',
|
25
|
+
:layout => '',
|
26
|
+
:file_name => '{title-with-dashes}.{extension}',
|
27
|
+
:permalink => '/{year}/{month}/{date}/{title}.html',
|
28
|
+
:plugins => ['maraku', 'liquid'],
|
29
|
+
:root => '.',
|
30
|
+
:target => '_site' }
|
31
|
+
|
32
|
+
|
33
|
+
# Creates the configuration hash by merging defaults, supplied options and options read from the 'options.yaml' file. Then loads the plugins
|
34
|
+
#
|
35
|
+
# @param [Hash] override to override other set options
|
36
|
+
# @return [Hash] the merged configuration hash
|
37
|
+
def self.configure( override={} )
|
38
|
+
config_file = (override[:root] || Defaults[:root]) + '/options.yaml'
|
39
|
+
config = YAML.load_file( config_file ).to_options
|
40
|
+
|
41
|
+
settings = Defaults.merge(config).merge(override)
|
42
|
+
settings[:plugins] = Henshin.load_plugins( settings[:plugins] )
|
43
|
+
settings[:extensions] = Henshin.extensions( settings[:plugins] )
|
44
|
+
settings
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
# Loads the specified plugins
|
49
|
+
#
|
50
|
+
# @param [Array] plugins list of plugins to load
|
51
|
+
# @return [Array] list of loaded plugin instances
|
52
|
+
def self.load_plugins( to_load )
|
53
|
+
plugins = []
|
54
|
+
to_load.each do |l|
|
55
|
+
require 'henshin/plugins/' + l
|
56
|
+
plugins << eval( l.capitalize + 'Plugin.new' )
|
57
|
+
end
|
58
|
+
plugins
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
# Lists the file extensions the currently loaded plugins use
|
63
|
+
#
|
64
|
+
# @param [Array] plugins array of loaded plugin instances
|
65
|
+
# @return [Array] a list of file extensions
|
66
|
+
def self.extensions( plugins )
|
67
|
+
extensions = []
|
68
|
+
plugins.each do |i|
|
69
|
+
extensions << i.extensions
|
70
|
+
end
|
71
|
+
extensions.flatten!
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
data/lib/henshin/ext.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
class Hash
|
2
|
+
# stripped straight out of rails
|
3
|
+
# converts string keys to symbol keys
|
4
|
+
# from http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Hash/Keys.html
|
5
|
+
def to_options
|
6
|
+
inject({}) do |options, (key, value)|
|
7
|
+
options[(key.to_sym rescue key) || key] = value
|
8
|
+
options
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
class String
|
14
|
+
|
15
|
+
# Turns the string to a slug
|
16
|
+
def slugify
|
17
|
+
slug = self.clone
|
18
|
+
slug.gsub!(/[']+/, '')
|
19
|
+
slug.gsub!(/\W+/, ' ')
|
20
|
+
slug.strip!
|
21
|
+
slug.downcase!
|
22
|
+
slug.gsub!(' ', '-')
|
23
|
+
slug
|
24
|
+
end
|
25
|
+
|
26
|
+
# Gets the extension from a string
|
27
|
+
def extension
|
28
|
+
self.split('.')[1]
|
29
|
+
end
|
30
|
+
|
31
|
+
# Gets the directory from a string
|
32
|
+
def directory
|
33
|
+
self =~ /((\/?[a-zA-Z0-9 _-]+\/)+)/
|
34
|
+
$1
|
35
|
+
end
|
36
|
+
|
37
|
+
# Gets the filename from a string
|
38
|
+
def file_name
|
39
|
+
self.dup.gsub(/([a-zA-Z0-9_-]+\/)/, '')
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
data/lib/henshin/gen.rb
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
module Henshin
|
2
|
+
|
3
|
+
# This is the main class for all pages, posts, sass, etc, that need to be run through a plugin
|
4
|
+
class Gen
|
5
|
+
|
6
|
+
attr_accessor :path, :extension, :content, :layout, :date, :title
|
7
|
+
attr_accessor :site, :config
|
8
|
+
|
9
|
+
def initialize( path, site )
|
10
|
+
@path = path
|
11
|
+
@site = site
|
12
|
+
@config = site.config
|
13
|
+
@extension = path.extension
|
14
|
+
@layout = site.layouts[ site.config[:layout] ]
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
##
|
19
|
+
# Processes the file
|
20
|
+
def process
|
21
|
+
self.read_yaml
|
22
|
+
end
|
23
|
+
|
24
|
+
# Reads the files yaml frontmatter and uses it to override some settings, then grabs content
|
25
|
+
def read_yaml
|
26
|
+
file = File.read(self.path)
|
27
|
+
|
28
|
+
if file =~ /^(---\s*\n.*?\n?^---\s*$\n?)/m
|
29
|
+
override = YAML.load_file(@path).to_options
|
30
|
+
self.override(override)
|
31
|
+
@content = file[$1.size..-1]
|
32
|
+
else
|
33
|
+
@content = file
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Uses the loaded data to override settings
|
38
|
+
#
|
39
|
+
# @param [Hash] override data to override settings with
|
40
|
+
def override( override )
|
41
|
+
@layout ||= @site.layouts[ override[:layout] ]
|
42
|
+
@date ||= Time.parse( override[:date].to_s )
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
##
|
47
|
+
# Renders the files content
|
48
|
+
def render
|
49
|
+
# render the posts content
|
50
|
+
config[:plugins].each do |plugin|
|
51
|
+
if plugin.extensions.include?( @extension ) && !plugin.is_a?( LayoutParser )
|
52
|
+
@content = plugin.generate( @content )
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# do the layout
|
57
|
+
config[:plugins].each do |plugin|
|
58
|
+
if plugin.is_a?( LayoutParser )
|
59
|
+
@content = plugin.generate( @layout, self.payload )
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Creates the data to be sent to the layout engine
|
65
|
+
#
|
66
|
+
# @return [Hash] the payload for the layout engine
|
67
|
+
def payload
|
68
|
+
{
|
69
|
+
'yield' => @content,
|
70
|
+
'site' => @site.payload['site']
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
74
|
+
|
75
|
+
##
|
76
|
+
# Writes the file to the correct place
|
77
|
+
def write
|
78
|
+
write_path = File.join( config[:root], config[:target], @path[ config[:root].size..-1 ] )
|
79
|
+
|
80
|
+
FileUtils.mkdir_p File.join( write_path.directory )
|
81
|
+
file = File.new( File.join( write_path ), "w" )
|
82
|
+
file.puts( @content )
|
83
|
+
end
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|