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.
- data/lib/awestruct/astruct.rb +4 -0
- data/lib/awestruct/astruct_mixin.rb +3 -0
- data/lib/awestruct/cli/auto.rb +6 -6
- data/lib/awestruct/cli/deploy.rb +3 -3
- data/lib/awestruct/cli/generate.rb +5 -3
- data/lib/awestruct/cli/init.rb +1 -1
- data/lib/awestruct/cli/invoker.rb +10 -3
- data/lib/awestruct/cli/manifest.rb +18 -17
- data/lib/awestruct/cli/options.rb +7 -6
- data/lib/awestruct/cli/server.rb +7 -14
- data/lib/awestruct/config.rb +7 -1
- data/lib/awestruct/config/default-site.yml +30 -0
- data/lib/awestruct/context_helper.rb +7 -7
- data/lib/awestruct/dependencies.rb +14 -11
- data/lib/awestruct/deploy/base_deploy.rb +2 -2
- data/lib/awestruct/deploy/github_pages_deploy.rb +1 -1
- data/lib/awestruct/deploy/rsync_deploy.rb +11 -15
- data/lib/awestruct/deploy/s3_deploy.rb +9 -0
- data/lib/awestruct/engine.rb +72 -21
- data/lib/awestruct/extensions/minify.rb +21 -20
- data/lib/awestruct/extensions/paginator.rb +5 -5
- data/lib/awestruct/extensions/partial.rb +1 -1
- data/lib/awestruct/extensions/pipeline.rb +5 -1
- data/lib/awestruct/extensions/posts.rb +8 -4
- data/lib/awestruct/extensions/relative.rb +7 -2
- data/lib/awestruct/extensions/remotePartial.rb +1 -1
- data/lib/awestruct/extensions/sitemap.rb +1 -1
- data/lib/awestruct/frameworks/bootstrap/base_index.html.haml +1 -1
- data/lib/awestruct/frameworks/bootstrap/base_layout.html.haml +1 -1
- data/lib/awestruct/handler_chains.rb +8 -23
- data/lib/awestruct/handlers/asciidoctor_handler.rb +114 -0
- data/lib/awestruct/handlers/base_tilt_handler.rb +114 -0
- data/lib/awestruct/handlers/css_tilt_handler.rb +43 -0
- data/lib/awestruct/handlers/front_matter_handler.rb +1 -1
- data/lib/awestruct/handlers/interpolation_handler.rb +3 -3
- data/lib/awestruct/handlers/layout_handler.rb +6 -4
- data/lib/awestruct/handlers/restructuredtext_handler.rb +5 -5
- data/lib/awestruct/handlers/template/asciidoc.rb +41 -0
- data/lib/awestruct/handlers/template/mustache.rb +25 -0
- data/lib/awestruct/handlers/tilt_handler.rb +73 -0
- data/lib/awestruct/layouts.rb +1 -1
- data/lib/awestruct/logger.rb +59 -0
- data/lib/awestruct/page.rb +16 -3
- data/lib/awestruct/page_loader.rb +5 -5
- data/lib/awestruct/version.rb +1 -1
- data/man/awestruct.1 +163 -0
- data/spec/asciidoc_handler_spec.rb +75 -0
- data/spec/astruct_spec.rb +52 -0
- data/spec/coffeescript_handler_spec.rb +23 -0
- data/spec/config_spec.rb +22 -0
- data/spec/context_helper_spec.rb +115 -0
- data/spec/deploy_spec.rb +41 -0
- data/spec/disqus_spec.rb +43 -0
- data/spec/engine_spec.rb +115 -0
- data/spec/erb_handler_spec.rb +52 -0
- data/spec/file_handler_spec.rb +57 -0
- data/spec/front_matter_handler_spec.rb +42 -0
- data/spec/github_pages_deploy_spec.rb +56 -0
- data/spec/haml_handler_spec.rb +93 -0
- data/spec/handler_chain_spec.rb +44 -0
- data/spec/handler_chains_spec.rb +25 -0
- data/spec/interpolation_handler_spec.rb +35 -0
- data/spec/invoker_spec.rb +74 -0
- data/spec/javascript_handler_spec.rb +23 -0
- data/spec/layout_handler_spec.rb +77 -0
- data/spec/layouts_spec.rb +32 -0
- data/spec/less_handler_spec.rb +33 -0
- data/spec/markdown_handler_spec.rb +41 -0
- data/spec/minify_spec.rb +61 -0
- data/spec/mustache_handler_spec.rb +29 -0
- data/spec/options_spec.rb +97 -0
- data/spec/orgmode_handler_spec.rb +24 -0
- data/spec/page_delegating_handler_spec.rb +79 -0
- data/spec/page_loader_spec.rb +43 -0
- data/spec/page_loader_spec_for_layouts.rb +36 -0
- data/spec/page_spec.rb +65 -0
- data/spec/pipeline_spec.rb +12 -0
- data/spec/posts_archive_spec.rb +108 -0
- data/spec/redirect_handler_spec.rb +32 -0
- data/spec/restructuredtext_handler_spec.rb +22 -0
- data/spec/rsync_deploy_spec.rb +9 -0
- data/spec/sass_handler_spec.rb +23 -0
- data/spec/scss_handler_spec.rb +23 -0
- data/spec/server_spec.rb +45 -0
- data/spec/slim_handler_spec.rb +81 -0
- data/spec/spec_helper.rb +18 -0
- data/spec/support/nokogiri_matchers.rb +21 -0
- data/spec/support/shared_handler_example.rb +98 -0
- data/spec/test-data/engine/_config/arbitrary.yml +2 -0
- data/spec/test-data/engine/_config/other.yml +1 -0
- data/spec/test-data/engine/_config/site.yml +14 -0
- data/spec/test-data/front-matter-file-no-content.txt +2 -0
- data/spec/test-data/front-matter-file-no-front.txt +1 -0
- data/spec/test-data/front-matter-file.txt +4 -0
- data/spec/test-data/handlers/asciidoc-page.ad +3 -0
- data/spec/test-data/handlers/asciidoc-page.adoc +3 -0
- data/spec/test-data/handlers/asciidoc-page.asciidoc +3 -0
- data/spec/test-data/handlers/asciidoctor_with_front_matter.ad +6 -0
- data/spec/test-data/handlers/asciidoctor_with_headers.ad +8 -0
- data/spec/test-data/handlers/coffeescript-page.coffee +8 -0
- data/spec/test-data/handlers/erb-page.html.erb +6 -0
- data/spec/test-data/handlers/erb-page.xml.erb +2 -0
- data/spec/test-data/handlers/erb-utf-page.html.erb +2 -0
- data/spec/test-data/handlers/haml-layout-two.html.haml +7 -0
- data/spec/test-data/handlers/haml-layout.html.haml +4 -0
- data/spec/test-data/handlers/haml-page.atom.haml +4 -0
- data/spec/test-data/handlers/haml-page.html.haml +2 -0
- data/spec/test-data/handlers/haml-page.xml.haml +1 -0
- data/spec/test-data/handlers/haml-with-markdown-page.html.haml +6 -0
- data/spec/test-data/handlers/haml-with-textile-page.html.haml +6 -0
- data/spec/test-data/handlers/haml-with-utf.html.haml +2 -0
- data/spec/test-data/handlers/haml-with-variables.html.haml +2 -0
- data/spec/test-data/handlers/inner-page.html.haml +4 -0
- data/spec/test-data/handlers/javascript-page.js +1 -0
- data/spec/test-data/handlers/less-page-include.less +1 -0
- data/spec/test-data/handlers/less-page-with-import.less +4 -0
- data/spec/test-data/handlers/less-page.less +4 -0
- data/spec/test-data/handlers/markdown-page.markdown +2 -0
- data/spec/test-data/handlers/markdown-page.md +2 -0
- data/spec/test-data/handlers/markdown-page.mkd +2 -0
- data/spec/test-data/handlers/mustache-page.html.mustache +2 -0
- data/spec/test-data/handlers/mustache-page.xml.mustache +1 -0
- data/spec/test-data/handlers/orgmode-page.org +6 -0
- data/spec/test-data/handlers/outer-layout.html.haml +2 -0
- data/spec/test-data/handlers/outside_relative/git_keep +3 -0
- data/spec/test-data/handlers/redirect-page.redirect +1 -0
- data/spec/test-data/handlers/restructuredtext-page.rst +8 -0
- data/spec/test-data/handlers/sass-page-include.sass +1 -0
- data/spec/test-data/handlers/sass-page.sass +4 -0
- data/spec/test-data/handlers/scss-page-include.scss +1 -0
- data/spec/test-data/handlers/scss-page.scss +5 -0
- data/spec/test-data/handlers/simple-redirect-page.redirect +1 -0
- data/spec/test-data/handlers/slim-page.atom.slim +4 -0
- data/spec/test-data/handlers/slim-page.html.slim +1 -0
- data/spec/test-data/handlers/slim-page.xml.slim +1 -0
- data/spec/test-data/handlers/slim-with-markdown-page.html.slim +5 -0
- data/spec/test-data/handlers/slim-with-utf.html.slim +2 -0
- data/spec/test-data/handlers/slim-with-variables.html.slim +1 -0
- data/spec/test-data/handlers/textile-page.textile +1 -0
- data/spec/test-data/images/logo.png +0 -0
- data/spec/test-data/index.html +242 -0
- data/spec/test-data/javascript/bootstrap-dropdown.js +92 -0
- data/spec/test-data/out-of-site/page-three.html.haml +2 -0
- data/spec/test-data/page-loader/_layouts/layout-one.md +2 -0
- data/spec/test-data/page-loader/_layouts/layout-two.html.haml +2 -0
- data/spec/test-data/page-loader/page-draft.md +5 -0
- data/spec/test-data/page-loader/page-one.md +2 -0
- data/spec/test-data/page-loader/page-two.html.haml +2 -0
- data/spec/test-data/simple-data.yaml +1 -0
- data/spec/test-data/simple-file.txt +1 -0
- data/spec/test-data/stylesheets/screen.css +688 -0
- data/spec/textile_handler_spec.rb +22 -0
- data/spec/tilt_handler_spec.rb +81 -0
- data/spec/yaml_handler_spec.rb +21 -0
- metadata +243 -202
- data/lib/awestruct/handlers/asciidoc_handler.rb +0 -86
- data/lib/awestruct/handlers/base_sass_handler.rb +0 -42
- data/lib/awestruct/handlers/coffeescript_handler.rb +0 -48
- data/lib/awestruct/handlers/erb_handler.rb +0 -43
- data/lib/awestruct/handlers/haml_handler.rb +0 -54
- data/lib/awestruct/handlers/less_handler.rb +0 -37
- data/lib/awestruct/handlers/markdown_handler.rb +0 -50
- data/lib/awestruct/handlers/mustache_handler.rb +0 -44
- data/lib/awestruct/handlers/orgmode_handler.rb +0 -48
- data/lib/awestruct/handlers/sass_handler.rb +0 -21
- data/lib/awestruct/handlers/scss_handler.rb +0 -21
- data/lib/awestruct/handlers/textile_handler.rb +0 -58
data/spec/spec_helper.rb
ADDED
@@ -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 @@
|
|
1
|
+
tags: [ 'a', 'b', 'c' ]
|
@@ -0,0 +1 @@
|
|
1
|
+
This is some content
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 This is a HAML page
|
@@ -0,0 +1 @@
|
|
1
|
+
var crunchy = "#{site.crunchy}"
|
@@ -0,0 +1 @@
|
|
1
|
+
@variable: 1;
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>This is a {{site.markup_type}} page</h1>
|
@@ -0,0 +1 @@
|
|
1
|
+
http://#{site.crunchy}.com
|
@@ -0,0 +1 @@
|
|
1
|
+
$main-color: #ce4dd6
|
@@ -0,0 +1 @@
|
|
1
|
+
$main-color: #ce4dd6;
|
@@ -0,0 +1 @@
|
|
1
|
+
http://google.com
|
@@ -0,0 +1 @@
|
|
1
|
+
h1 This is a Slim page
|
@@ -0,0 +1 @@
|
|
1
|
+
h1 This is a Slim page
|
@@ -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>© 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>
|