awestruct 0.4.8 → 0.5.0.cr

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/lib/awestruct/astruct.rb +4 -0
  2. data/lib/awestruct/astruct_mixin.rb +3 -0
  3. data/lib/awestruct/cli/auto.rb +6 -6
  4. data/lib/awestruct/cli/deploy.rb +3 -3
  5. data/lib/awestruct/cli/generate.rb +5 -3
  6. data/lib/awestruct/cli/init.rb +1 -1
  7. data/lib/awestruct/cli/invoker.rb +10 -3
  8. data/lib/awestruct/cli/manifest.rb +18 -17
  9. data/lib/awestruct/cli/options.rb +7 -6
  10. data/lib/awestruct/cli/server.rb +7 -14
  11. data/lib/awestruct/config.rb +7 -1
  12. data/lib/awestruct/config/default-site.yml +30 -0
  13. data/lib/awestruct/context_helper.rb +7 -7
  14. data/lib/awestruct/dependencies.rb +14 -11
  15. data/lib/awestruct/deploy/base_deploy.rb +2 -2
  16. data/lib/awestruct/deploy/github_pages_deploy.rb +1 -1
  17. data/lib/awestruct/deploy/rsync_deploy.rb +11 -15
  18. data/lib/awestruct/deploy/s3_deploy.rb +9 -0
  19. data/lib/awestruct/engine.rb +72 -21
  20. data/lib/awestruct/extensions/minify.rb +21 -20
  21. data/lib/awestruct/extensions/paginator.rb +5 -5
  22. data/lib/awestruct/extensions/partial.rb +1 -1
  23. data/lib/awestruct/extensions/pipeline.rb +5 -1
  24. data/lib/awestruct/extensions/posts.rb +8 -4
  25. data/lib/awestruct/extensions/relative.rb +7 -2
  26. data/lib/awestruct/extensions/remotePartial.rb +1 -1
  27. data/lib/awestruct/extensions/sitemap.rb +1 -1
  28. data/lib/awestruct/frameworks/bootstrap/base_index.html.haml +1 -1
  29. data/lib/awestruct/frameworks/bootstrap/base_layout.html.haml +1 -1
  30. data/lib/awestruct/handler_chains.rb +8 -23
  31. data/lib/awestruct/handlers/asciidoctor_handler.rb +114 -0
  32. data/lib/awestruct/handlers/base_tilt_handler.rb +114 -0
  33. data/lib/awestruct/handlers/css_tilt_handler.rb +43 -0
  34. data/lib/awestruct/handlers/front_matter_handler.rb +1 -1
  35. data/lib/awestruct/handlers/interpolation_handler.rb +3 -3
  36. data/lib/awestruct/handlers/layout_handler.rb +6 -4
  37. data/lib/awestruct/handlers/restructuredtext_handler.rb +5 -5
  38. data/lib/awestruct/handlers/template/asciidoc.rb +41 -0
  39. data/lib/awestruct/handlers/template/mustache.rb +25 -0
  40. data/lib/awestruct/handlers/tilt_handler.rb +73 -0
  41. data/lib/awestruct/layouts.rb +1 -1
  42. data/lib/awestruct/logger.rb +59 -0
  43. data/lib/awestruct/page.rb +16 -3
  44. data/lib/awestruct/page_loader.rb +5 -5
  45. data/lib/awestruct/version.rb +1 -1
  46. data/man/awestruct.1 +163 -0
  47. data/spec/asciidoc_handler_spec.rb +75 -0
  48. data/spec/astruct_spec.rb +52 -0
  49. data/spec/coffeescript_handler_spec.rb +23 -0
  50. data/spec/config_spec.rb +22 -0
  51. data/spec/context_helper_spec.rb +115 -0
  52. data/spec/deploy_spec.rb +41 -0
  53. data/spec/disqus_spec.rb +43 -0
  54. data/spec/engine_spec.rb +115 -0
  55. data/spec/erb_handler_spec.rb +52 -0
  56. data/spec/file_handler_spec.rb +57 -0
  57. data/spec/front_matter_handler_spec.rb +42 -0
  58. data/spec/github_pages_deploy_spec.rb +56 -0
  59. data/spec/haml_handler_spec.rb +93 -0
  60. data/spec/handler_chain_spec.rb +44 -0
  61. data/spec/handler_chains_spec.rb +25 -0
  62. data/spec/interpolation_handler_spec.rb +35 -0
  63. data/spec/invoker_spec.rb +74 -0
  64. data/spec/javascript_handler_spec.rb +23 -0
  65. data/spec/layout_handler_spec.rb +77 -0
  66. data/spec/layouts_spec.rb +32 -0
  67. data/spec/less_handler_spec.rb +33 -0
  68. data/spec/markdown_handler_spec.rb +41 -0
  69. data/spec/minify_spec.rb +61 -0
  70. data/spec/mustache_handler_spec.rb +29 -0
  71. data/spec/options_spec.rb +97 -0
  72. data/spec/orgmode_handler_spec.rb +24 -0
  73. data/spec/page_delegating_handler_spec.rb +79 -0
  74. data/spec/page_loader_spec.rb +43 -0
  75. data/spec/page_loader_spec_for_layouts.rb +36 -0
  76. data/spec/page_spec.rb +65 -0
  77. data/spec/pipeline_spec.rb +12 -0
  78. data/spec/posts_archive_spec.rb +108 -0
  79. data/spec/redirect_handler_spec.rb +32 -0
  80. data/spec/restructuredtext_handler_spec.rb +22 -0
  81. data/spec/rsync_deploy_spec.rb +9 -0
  82. data/spec/sass_handler_spec.rb +23 -0
  83. data/spec/scss_handler_spec.rb +23 -0
  84. data/spec/server_spec.rb +45 -0
  85. data/spec/slim_handler_spec.rb +81 -0
  86. data/spec/spec_helper.rb +18 -0
  87. data/spec/support/nokogiri_matchers.rb +21 -0
  88. data/spec/support/shared_handler_example.rb +98 -0
  89. data/spec/test-data/engine/_config/arbitrary.yml +2 -0
  90. data/spec/test-data/engine/_config/other.yml +1 -0
  91. data/spec/test-data/engine/_config/site.yml +14 -0
  92. data/spec/test-data/front-matter-file-no-content.txt +2 -0
  93. data/spec/test-data/front-matter-file-no-front.txt +1 -0
  94. data/spec/test-data/front-matter-file.txt +4 -0
  95. data/spec/test-data/handlers/asciidoc-page.ad +3 -0
  96. data/spec/test-data/handlers/asciidoc-page.adoc +3 -0
  97. data/spec/test-data/handlers/asciidoc-page.asciidoc +3 -0
  98. data/spec/test-data/handlers/asciidoctor_with_front_matter.ad +6 -0
  99. data/spec/test-data/handlers/asciidoctor_with_headers.ad +8 -0
  100. data/spec/test-data/handlers/coffeescript-page.coffee +8 -0
  101. data/spec/test-data/handlers/erb-page.html.erb +6 -0
  102. data/spec/test-data/handlers/erb-page.xml.erb +2 -0
  103. data/spec/test-data/handlers/erb-utf-page.html.erb +2 -0
  104. data/spec/test-data/handlers/haml-layout-two.html.haml +7 -0
  105. data/spec/test-data/handlers/haml-layout.html.haml +4 -0
  106. data/spec/test-data/handlers/haml-page.atom.haml +4 -0
  107. data/spec/test-data/handlers/haml-page.html.haml +2 -0
  108. data/spec/test-data/handlers/haml-page.xml.haml +1 -0
  109. data/spec/test-data/handlers/haml-with-markdown-page.html.haml +6 -0
  110. data/spec/test-data/handlers/haml-with-textile-page.html.haml +6 -0
  111. data/spec/test-data/handlers/haml-with-utf.html.haml +2 -0
  112. data/spec/test-data/handlers/haml-with-variables.html.haml +2 -0
  113. data/spec/test-data/handlers/inner-page.html.haml +4 -0
  114. data/spec/test-data/handlers/javascript-page.js +1 -0
  115. data/spec/test-data/handlers/less-page-include.less +1 -0
  116. data/spec/test-data/handlers/less-page-with-import.less +4 -0
  117. data/spec/test-data/handlers/less-page.less +4 -0
  118. data/spec/test-data/handlers/markdown-page.markdown +2 -0
  119. data/spec/test-data/handlers/markdown-page.md +2 -0
  120. data/spec/test-data/handlers/markdown-page.mkd +2 -0
  121. data/spec/test-data/handlers/mustache-page.html.mustache +2 -0
  122. data/spec/test-data/handlers/mustache-page.xml.mustache +1 -0
  123. data/spec/test-data/handlers/orgmode-page.org +6 -0
  124. data/spec/test-data/handlers/outer-layout.html.haml +2 -0
  125. data/spec/test-data/handlers/outside_relative/git_keep +3 -0
  126. data/spec/test-data/handlers/redirect-page.redirect +1 -0
  127. data/spec/test-data/handlers/restructuredtext-page.rst +8 -0
  128. data/spec/test-data/handlers/sass-page-include.sass +1 -0
  129. data/spec/test-data/handlers/sass-page.sass +4 -0
  130. data/spec/test-data/handlers/scss-page-include.scss +1 -0
  131. data/spec/test-data/handlers/scss-page.scss +5 -0
  132. data/spec/test-data/handlers/simple-redirect-page.redirect +1 -0
  133. data/spec/test-data/handlers/slim-page.atom.slim +4 -0
  134. data/spec/test-data/handlers/slim-page.html.slim +1 -0
  135. data/spec/test-data/handlers/slim-page.xml.slim +1 -0
  136. data/spec/test-data/handlers/slim-with-markdown-page.html.slim +5 -0
  137. data/spec/test-data/handlers/slim-with-utf.html.slim +2 -0
  138. data/spec/test-data/handlers/slim-with-variables.html.slim +1 -0
  139. data/spec/test-data/handlers/textile-page.textile +1 -0
  140. data/spec/test-data/images/logo.png +0 -0
  141. data/spec/test-data/index.html +242 -0
  142. data/spec/test-data/javascript/bootstrap-dropdown.js +92 -0
  143. data/spec/test-data/out-of-site/page-three.html.haml +2 -0
  144. data/spec/test-data/page-loader/_layouts/layout-one.md +2 -0
  145. data/spec/test-data/page-loader/_layouts/layout-two.html.haml +2 -0
  146. data/spec/test-data/page-loader/page-draft.md +5 -0
  147. data/spec/test-data/page-loader/page-one.md +2 -0
  148. data/spec/test-data/page-loader/page-two.html.haml +2 -0
  149. data/spec/test-data/simple-data.yaml +1 -0
  150. data/spec/test-data/simple-file.txt +1 -0
  151. data/spec/test-data/stylesheets/screen.css +688 -0
  152. data/spec/textile_handler_spec.rb +22 -0
  153. data/spec/tilt_handler_spec.rb +81 -0
  154. data/spec/yaml_handler_spec.rb +21 -0
  155. metadata +243 -202
  156. data/lib/awestruct/handlers/asciidoc_handler.rb +0 -86
  157. data/lib/awestruct/handlers/base_sass_handler.rb +0 -42
  158. data/lib/awestruct/handlers/coffeescript_handler.rb +0 -48
  159. data/lib/awestruct/handlers/erb_handler.rb +0 -43
  160. data/lib/awestruct/handlers/haml_handler.rb +0 -54
  161. data/lib/awestruct/handlers/less_handler.rb +0 -37
  162. data/lib/awestruct/handlers/markdown_handler.rb +0 -50
  163. data/lib/awestruct/handlers/mustache_handler.rb +0 -44
  164. data/lib/awestruct/handlers/orgmode_handler.rb +0 -48
  165. data/lib/awestruct/handlers/sass_handler.rb +0 -21
  166. data/lib/awestruct/handlers/scss_handler.rb +0 -21
  167. data/lib/awestruct/handlers/textile_handler.rb +0 -58
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'rspec'
3
+ require 'logger'
4
+ require 'fileutils'
5
+
6
+ Dir["./spec/support/**/*.rb"].each {|f| require f}
7
+
8
+ RSpec.configure do |config|
9
+ config.before :all do
10
+ FileUtils.mkdir('.awestruct') unless File.exists? '.awestruct'
11
+ $LOG = Logger.new('.awestruct/test.log')
12
+ end
13
+ config.mock_framework = :rspec
14
+ config.include NokogiriMatchers
15
+ config.after :all do
16
+ FileUtils.rm_rf '.awestruct' if File.exists? '.awestruct'
17
+ end
18
+ end
@@ -0,0 +1,21 @@
1
+ require 'nokogiri'
2
+
3
+ module NokogiriMatchers
4
+ class HtmlMatchers
5
+ def initialize(tag)
6
+ @tag = tag.to_s
7
+ end
8
+ def matches?(document)
9
+ @document = Nokogiri::HTML.fragment document
10
+ !@document.search(@tag).nil?
11
+ end
12
+
13
+ def failure_message_for_should
14
+ "expected to find #{@tag} within #{@document.to_s} but was not found"
15
+ end
16
+ end
17
+
18
+ def have_tag(expect)
19
+ HtmlMatchers.new(expect)
20
+ end
21
+ end
@@ -0,0 +1,98 @@
1
+ require 'awestruct/engine'
2
+ require 'awestruct/config'
3
+ require 'rspec'
4
+
5
+ require 'hashery/open_cascade'
6
+
7
+ REQUIRED_VARIABLES = [:page, :simple_name, :syntax, :extension]
8
+ ALL_VARIABLES = REQUIRED_VARIABLES + [:format, :matcher, :unless]
9
+
10
+ shared_examples "a handler" do |theories|
11
+
12
+ def handler_file(path)
13
+ "#{@site.config.dir}/#{path}"
14
+ end
15
+
16
+ def create_context
17
+ OpenCascade.new :site=>@site
18
+ end
19
+
20
+ describe Awestruct::Handlers do
21
+
22
+ before :all do
23
+
24
+ @engine = Awestruct::Engine.new(
25
+ Awestruct::Config.new( File.expand_path(File.dirname(__FILE__) + '/../') + '/test-data/handlers' ))
26
+ @engine.load_default_site_yaml
27
+ @site = @engine.site
28
+
29
+ @site.merge! additional_config if respond_to?("additional_config")
30
+ end
31
+
32
+ def create_handler(page)
33
+ @engine.load_page File.join(@engine.config.dir, page)
34
+ end
35
+
36
+ theories.each do |theory|
37
+
38
+ # Validate input
39
+ missing = []
40
+ REQUIRED_VARIABLES.each do |key|
41
+ missing << key unless theory.has_key? key
42
+ end
43
+ raise "Missing required variable(s) '#{missing.join(', ')}'. Requires all '#{REQUIRED_VARIABLES.join(', ')}'" if missing.size > 0
44
+
45
+ unknown = theory.keys-ALL_VARIABLES
46
+ raise "Unknown theory variable(s) '#{unknown.join(', ')}'. Supported variables '#{ALL_VARIABLES.join(', ')}'" if unknown.size > 0
47
+
48
+ # Prove the theory
49
+
50
+ it "should provide simple name '#{theory[:simple_name]}' for page '#{theory[:page]}'" do
51
+ handler = create_handler theory[:page]
52
+ handler.simple_name.should == theory[:simple_name]
53
+ end
54
+
55
+ it "should provide content syntax '#{theory[:syntax]}' for page '#{theory[:page]}'" do
56
+ handler = create_handler theory[:page]
57
+ handler.content_syntax.should == theory[:syntax]
58
+ end
59
+
60
+ it "should provide output extension '#{theory[:extension]}' for page '#{theory[:page]}'" do
61
+ handler = create_handler theory[:page]
62
+ handler.output_extension.should == theory[:extension]
63
+ end
64
+
65
+ if !theory[:format].nil?
66
+ it "should set the engine format '#{theory[:format]}' for page '#{theory[:page]}'" do
67
+ page = create_handler theory[:page]
68
+ handler = page.handler
69
+ begin
70
+ handler = handler.delegate
71
+ end while handler.delegate and !handler.kind_of?(Awestruct::Handlers::TiltHandler)
72
+ handler.should_not be_nil
73
+ handler.options[:format].should == theory[:format]
74
+ end
75
+ end
76
+
77
+ if !theory[:matcher].nil?
78
+
79
+ it "should render page '#{theory[:page]}'" do
80
+ if theory[:unless].nil? or !theory[:unless][:exp].call()
81
+ handler = create_handler theory[:page]
82
+ handler.merge! additional_config_page if respond_to?("additional_config_page")
83
+
84
+ output = handler.rendered_content( handler.create_context )
85
+ output.should_not be_nil
86
+
87
+ theory[:matcher].call(output, handler) if theory[:matcher].arity == 2
88
+ theory[:matcher].call(output) if theory[:matcher].arity == 1
89
+ else
90
+ pending theory[:unless][:message]
91
+ end
92
+ end
93
+
94
+ end
95
+
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,2 @@
1
+
2
+ name: randomness
@@ -0,0 +1 @@
1
+ tags: [ 'a', 'b', 'c' ]
@@ -0,0 +1,14 @@
1
+
2
+ profiles:
3
+ development:
4
+ cook: microwave
5
+ production:
6
+ cook: oven
7
+ staging:
8
+ compass_line_comments: off
9
+
10
+ title: Awestruction!
11
+
12
+ asciidoctor:
13
+ :attributes:
14
+ backend: html4
@@ -0,0 +1,2 @@
1
+ ---
2
+ foo: bar
@@ -0,0 +1 @@
1
+ This is some content
@@ -0,0 +1,4 @@
1
+ ---
2
+ foo: bar
3
+ ---
4
+ This is some content
@@ -0,0 +1,3 @@
1
+ = Title
2
+
3
+ This is *AsciiDoc* in Awestruct.
@@ -0,0 +1,3 @@
1
+ = Title
2
+
3
+ This is *AsciiDoc* in Awestruct.
@@ -0,0 +1,3 @@
1
+ = Title
2
+
3
+ This is *AsciiDoc* in Awestruct.
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: AwestructAsciiDoc
3
+ ---
4
+ = AsciiDoc
5
+
6
+ This is *AsciiDoc* in Awestruct.
@@ -0,0 +1,8 @@
1
+ = AsciiDoc
2
+ Stuart Rackham
3
+ 2013-02-06
4
+ :awestruct-tags: [a, b, c]
5
+ :name: NOT_HANDLED
6
+
7
+ This is *AsciiDoc* in {name}.
8
+ {awestruct-version}
@@ -0,0 +1,8 @@
1
+ # Assignment:
2
+ number = 42
3
+ opposite = true
4
+
5
+ # Conditions:
6
+ number = -42 if opposite
7
+
8
+ print number
@@ -0,0 +1,6 @@
1
+ <%# @encoding:UTF-8 %>
2
+ <h1>This is an ERB page</h1>
3
+ <h2>The fruit of the day is: <%= "apples" %></h2>
4
+ <h3><%=site.crunchy%></h3>
5
+
6
+ <p>Besøg fra Danmark</p>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <h><%=site.crunchy%></h>
@@ -0,0 +1,2 @@
1
+ <%# @encoding:UTF-8 %>
2
+ Besøg fra Danmark
@@ -0,0 +1,7 @@
1
+ ---
2
+ layout: haml-layout
3
+ ---
4
+
5
+ %h1 Welcome to Awestruct
6
+
7
+ = content
@@ -0,0 +1,4 @@
1
+
2
+ %h1 This is a haml layout
3
+
4
+ %h2= content
@@ -0,0 +1,4 @@
1
+ !!! XML
2
+ %feed(xmlns='http://www.w3.org/2005/Atom')
3
+ %id http://example.com
4
+ %title A News Feed
@@ -0,0 +1,2 @@
1
+
2
+ %h1 This is a HAML page
@@ -0,0 +1 @@
1
+ %h1 This is a HAML page
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: A Sample Page With Markdown
3
+ ---
4
+ :markdown
5
+ # Hello From Markdown
6
+
@@ -0,0 +1,6 @@
1
+ ---
2
+ title: A Sample Page With Textile
3
+ ---
4
+ :textile
5
+ h1. Hello From Textile
6
+
@@ -0,0 +1,2 @@
1
+ -# coding: utf-8
2
+ %h1 Besøg fra Danmark
@@ -0,0 +1,2 @@
1
+ %h1 #{site.crunchy}
2
+
@@ -0,0 +1,4 @@
1
+ ---
2
+ layout: haml-layout
3
+ ---
4
+ This is the inner page
@@ -0,0 +1 @@
1
+ var crunchy = "#{site.crunchy}"
@@ -0,0 +1 @@
1
+ @variable: 1;
@@ -0,0 +1,4 @@
1
+ @import "less-page-include.less";
2
+ .class {
3
+ width: 1 + @variable;
4
+ }
@@ -0,0 +1,4 @@
1
+ @variable: 1;
2
+ .class {
3
+ width: 1 + @variable;
4
+ }
@@ -0,0 +1,2 @@
1
+
2
+ # This is a Markdown page
@@ -0,0 +1,2 @@
1
+
2
+ # This is a Markdown page
@@ -0,0 +1,2 @@
1
+
2
+ # This is a Markdown page
@@ -0,0 +1,2 @@
1
+
2
+ <h1>This is a {{site.markup_type}} page</h1>
@@ -0,0 +1 @@
1
+ <h1>This is a {{site.markup_type}} page</h1>
@@ -0,0 +1,6 @@
1
+ * Fruit
2
+ ** Apples
3
+ Apples are red
4
+ ** Oranges
5
+ Oranges are orange
6
+ *Vegetables
@@ -0,0 +1,2 @@
1
+ %b
2
+ = content
@@ -0,0 +1,3 @@
1
+ Just here to keep the directory for git
2
+
3
+ Used in tilt_handler_spec.rb to test relative_source_path nil handling
@@ -0,0 +1 @@
1
+ http://#{site.crunchy}.com
@@ -0,0 +1,8 @@
1
+
2
+ This is a paragraph. It's quite
3
+ short.
4
+
5
+ This paragraph will result in an indented block of
6
+ text, typically used for quoting other text.
7
+
8
+ This is another one.
@@ -0,0 +1 @@
1
+ $main-color: #ce4dd6
@@ -0,0 +1,4 @@
1
+ @import "sass-page-include"
2
+
3
+ #test
4
+ background-color: $main-color
@@ -0,0 +1 @@
1
+ $main-color: #ce4dd6;
@@ -0,0 +1,5 @@
1
+ @import "scss-page-include";
2
+
3
+ #test {
4
+ background-color: $main-color;
5
+ }
@@ -0,0 +1 @@
1
+ http://google.com
@@ -0,0 +1,4 @@
1
+ doctype xml
2
+ feed xmlns='http://www.w3.org/2005/Atom'
3
+ id http://example.com
4
+ title A News Feed
@@ -0,0 +1 @@
1
+ h1 This is a Slim page
@@ -0,0 +1 @@
1
+ h1 This is a Slim page
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: A Sample Page With Markdown
3
+ ---
4
+ markdown:
5
+ # Hello From Markdown
@@ -0,0 +1,2 @@
1
+ -# coding: utf-8
2
+ h1 Besøg fra Danmark
@@ -0,0 +1 @@
1
+ h1 #{site.crunchy}
@@ -0,0 +1 @@
1
+ h3. Test
Binary file
@@ -0,0 +1,242 @@
1
+ <html>
2
+ <head>
3
+ <meta charset='utf-8' />
4
+ <title>awestruct: home</title>
5
+ <link href='/news.atom' rel='alternate' type='application/atom+xml' />
6
+ <meta content='width=device-width, initial-scale=1.0' name='viewport' />
7
+ <style type='text/css'>
8
+ /*<![CDATA[*/
9
+ body {
10
+ padding-top: 60px;
11
+ }
12
+ /*]]>*/
13
+ </style>
14
+ <script src='http://code.jquery.com/jquery-1.7.2.min.js' type='text/javascript'></script>
15
+ <link href='http://staging.awestruct.org/stylesheets/styles.css' rel='stylesheet' type='text/css' />
16
+ <link href='http://yandex.st/highlightjs/7.0/styles/default.min.css' rel='stylesheet' />
17
+ <script src='http://yandex.st/highlightjs/7.0/highlight.min.js'></script>
18
+ <!--[if lt IE 9]>
19
+ <script src='http://html5shim.googlecode.com/svn/trunk/html5.js' type='text/javascript'></script>
20
+ <![endif]-->
21
+ <script type='text/javascript'>
22
+ //<![CDATA[
23
+ $.getJSON("https://rubygems.org/api/v1/versions/awestruct.json?callback=?", function(data) { alert( data.number ); });
24
+ hljs.initHighlightingOnLoad();
25
+ //]]>
26
+ </script>
27
+ </head>
28
+ <body>
29
+ <div class='navbar navbar-fixed-top'>
30
+ <div class='navbar-inner'>
31
+ <div class='container'>
32
+ <div class='github-banner'>
33
+ <a href='https://github.com/awestruct/awestruct'>
34
+ <img alt='Fork me on GitHub' src='https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png' style='position: absolute; top: 0; right: 0; border: 0;z-index: 900;' />
35
+ </a>
36
+ </div>
37
+ <a class='brand' href='http://staging.awestruct.org'>{:awestruct}</a>
38
+ <ul class='nav'>
39
+ <li>
40
+ <a href='http://staging.awestruct.org'>Home</a>
41
+ </li>
42
+ <li>
43
+ <a href='http://staging.awestruct.org/news/'>News</a>
44
+ </li>
45
+ <li class='dropdown' id='getting-started-menu'>
46
+ <a class='dropdown-toggle' data-toggle='dropdown' href='#getting-started-menu'>
47
+ Documentation
48
+ <b class='caret'></b>
49
+ </a>
50
+ <ul class='dropdown-menu'>
51
+ <li>
52
+ <a href='http://staging.awestruct.org/getting_started/'>Getting Started</a>
53
+ </li>
54
+ <li>
55
+ <a href='http://staging.awestruct.org/layout/'>Project Layout</a>
56
+ </li>
57
+ <li>
58
+ <a href='http://staging.awestruct.org/profiles/'>Site Profiles</a>
59
+ </li>
60
+ <li>
61
+ <a href='http://staging.awestruct.org/file_types/'>File Types</a>
62
+ </li>
63
+ <li>
64
+ <a href='http://staging.awestruct.org/skins/'>Skins</a>
65
+ </li>
66
+ <li>
67
+ <a href='http://staging.awestruct.org/template_context/'>Template Context</a>
68
+ </li>
69
+ <li>
70
+ <a href='http://staging.awestruct.org/deployment/'>Site Deployment</a>
71
+ </li>
72
+ </ul>
73
+ </li>
74
+ <li class='dropdown' id='extensions-menu'>
75
+ <a class='dropdown-toggle' data-toggle='dropdown' href='#extensions-menu'>
76
+ Extensions
77
+ <b class='caret'></b>
78
+ </a>
79
+ <ul class='dropdown-menu'>
80
+ <li>
81
+ <a href='http://staging.awestruct.org/extensions/'>Overview</a>
82
+ </li>
83
+ <li>
84
+ <a href='http://staging.awestruct.org/extensions/atomizer/'>Atomizer</a>
85
+ </li>
86
+ <li>
87
+ <a href='http://staging.awestruct.org/extensions/data_dir/'>DataDir</a>
88
+ </li>
89
+ <li>
90
+ <a href='http://staging.awestruct.org/extensions/disqus/'>Disqus</a>
91
+ </li>
92
+ <li>
93
+ <a href='http://staging.awestruct.org/extensions/flattr/'>Flattr</a>
94
+ </li>
95
+ <li>
96
+ <a href='http://staging.awestruct.org/extensions/indexifier/'>Indexifier</a>
97
+ </li>
98
+ <li>
99
+ <a href='http://staging.awestruct.org/extensions/intense_debate/'>IntenseDebate</a>
100
+ </li>
101
+ <li>
102
+ <a href='http://staging.awestruct.org/extensions/paginator/'>Paginator</a>
103
+ </li>
104
+ <li>
105
+ <a href='http://staging.awestruct.org/extensions/posts/'>Posts</a>
106
+ </li>
107
+ <li>
108
+ <a href='http://staging.awestruct.org/extensions/sitemap/'>Sitemap</a>
109
+ </li>
110
+ <li>
111
+ <a href='http://staging.awestruct.org/extensions/tag_cloud/'>TagCloud</a>
112
+ </li>
113
+ <li>
114
+ <a href='http://staging.awestruct.org/extensions/tagger/'>Tagger</a>
115
+ </li>
116
+ <li>
117
+ <a href='http://staging.awestruct.org/extensions/textile/'>Textile</a>
118
+ </li>
119
+ </ul>
120
+ </li>
121
+ <li class='dropdown' id='helpers-menu'>
122
+ <a class='dropdown-toggle' data-toggle='dropdown' href='#helpers-menu'>
123
+ Helpers
124
+ <b class='caret'></b>
125
+ </a>
126
+ <ul class='dropdown-menu'>
127
+ <li>
128
+ <a href='http://staging.awestruct.org/helpers/'>Overview</a>
129
+ </li>
130
+ <li>
131
+ <a href='http://staging.awestruct.org/helpers/partial/'>Partial</a>
132
+ </li>
133
+ <li>
134
+ <a href='http://staging.awestruct.org/helpers/google_analytics/'>Google Analytics</a>
135
+ </li>
136
+ </ul>
137
+ </li>
138
+ </ul>
139
+ </div>
140
+ </div>
141
+ </div>
142
+ <div class='container'>
143
+ <div class='row'>
144
+ <div class='span3'>
145
+ <div class='well'>
146
+ <h2>Build Status</h2>
147
+ <p>
148
+ Travis-CI
149
+ <a href='http://travis-ci.org/awestruct/awestruct'>
150
+ <img src='https://secure.travis-ci.org/awestruct/awestruct.png' />
151
+ </a>
152
+ </p>
153
+ <p>
154
+ CloudBees
155
+ <a href='https://buildhive.cloudbees.com/job/awestruct/job/awestruct/'>
156
+ <img src='https://buildhive.cloudbees.com/job/awestruct/job/awestruct/badge/icon' />
157
+ </a>
158
+ </p>
159
+ </div>
160
+ <div id='sidebar'>
161
+ <ul class='nav nav-tabs nav-stacked'>
162
+ <li>
163
+ <a href='http://staging.awestruct.org/gallery/'>Gallery</a>
164
+ </li>
165
+ <li>
166
+ <a href='http://staging.awestruct.org/source/'>Source Code</a>
167
+ </li>
168
+ <li>
169
+ <a href='http://staging.awestruct.org/yardoc/'>API Documentation</a>
170
+ </li>
171
+ <li>
172
+ <a href='mailto:talk-subscribe@awestruct.org?subject=subscribe'>Mailing List</a>
173
+ </li>
174
+ <li>
175
+ <a href='http://talk-archive.awestruct.org/'>List Archives</a>
176
+ </li>
177
+ <li>
178
+ <a href='http://twitter.com/awestructed'>Twitter</a>
179
+ </li>
180
+ </ul>
181
+ </div>
182
+ </div>
183
+ <div class='span8'>
184
+ <div class='page-header'>
185
+ <h1>
186
+ { :awestruct }
187
+ <small>A static site-baking tool</small>
188
+ </h1>
189
+ </div>
190
+ <p>
191
+ Awestruct is a framework for creating static HTML sites, inspired by the
192
+ <a href='http://github.com/mojombo/jekyll'>Jekyll</a>
193
+ utility in the same genre.
194
+ </p>
195
+ <p>
196
+ Awestruct makes it trivially easy to create non-trivial static websites using
197
+ tools like
198
+ <a href='http://compass-style.org'>Compass,</a>
199
+ <a href='http://daringfireball.net/projects/markdown/syntax'>Markdown,</a>
200
+ and
201
+ <a href='http://haml-lang.com'>Haml,</a>
202
+ as well as common frameworks like Twitter Bootstrap and Blueprint.
203
+ </p>
204
+ <p>
205
+ The core concept of Awestruct is that of structures, specifically Ruby
206
+ `OpenStruct` structures. The struct aspect allows arbitrary, schema-less data
207
+ to be associated with a specific page or the entire site.
208
+ </p>
209
+ <p>
210
+ Site-specific data is automatically loaded from simple YAML files, while data
211
+ can be provided on pages using a front-matter prolog.
212
+ </p>
213
+ <div class='row'>
214
+ <div class='span4'>
215
+ <div class='well'>
216
+ <h2>
217
+ Install
218
+ <small>Version 0.4.5</small>
219
+ </h2>
220
+ <pre><code class='bash'>$ gem install awestruct</code></pre>
221
+ </div>
222
+ </div>
223
+ <div class='span4'>
224
+ <div class='well'>
225
+ <h2>Getting Started</h2>
226
+ <pre><code class='bash'>$ awestruct -i -f bootstrap</code></pre>
227
+ </div>
228
+ </div>
229
+ </div>
230
+ </div>
231
+ </div>
232
+ <div class='row'>
233
+ <hr />
234
+ <footer>
235
+ <p>&copy; Bob McWhirter 2012</p>
236
+ <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'></script>
237
+ <script src='http://staging.awestruct.org/javascript/bootstrap-dropdown.js' type='text/javascript'></script>
238
+ </footer>
239
+ </div>
240
+ </div>
241
+ </body>
242
+ </html>