awestruct 0.2.18 → 0.4.2.x1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/awestruct +2 -274
- data/lib/awestruct/astruct.rb +22 -0
- data/lib/awestruct/astruct_mixin.rb +81 -0
- data/lib/awestruct/cli/auto.rb +34 -0
- data/lib/awestruct/cli/deploy.rb +38 -0
- data/lib/awestruct/{commands → cli}/generate.rb +3 -3
- data/lib/awestruct/cli/invoker.rb +120 -0
- data/lib/awestruct/cli/options.rb +116 -0
- data/lib/awestruct/{commands → cli}/server.rb +1 -1
- data/lib/awestruct/config.rb +20 -8
- data/lib/awestruct/context.rb +22 -0
- data/lib/awestruct/dependencies.rb +102 -0
- data/lib/awestruct/deploy/github_pages_deploy.rb +61 -0
- data/lib/awestruct/{commands/deploy.rb → deploy/rsync_deploy.rb} +10 -6
- data/lib/awestruct/deployers.rb +15 -0
- data/lib/awestruct/engine.rb +172 -411
- data/lib/awestruct/extensions/atomizer.rb +7 -4
- data/lib/awestruct/extensions/coffeescripttransform.rb +42 -0
- data/lib/awestruct/extensions/minify.rb +21 -23
- data/lib/awestruct/extensions/paginator.rb +6 -4
- data/lib/awestruct/extensions/partial.rb +0 -1
- data/lib/awestruct/extensions/pipeline.rb +5 -0
- data/lib/awestruct/extensions/posts.rb +11 -9
- data/lib/awestruct/extensions/sitemap.rb +2 -1
- data/lib/awestruct/extensions/tagger.rb +0 -2
- data/lib/awestruct/extensions/template.atom.haml +4 -3
- data/lib/awestruct/handler_chain.rb +28 -0
- data/lib/awestruct/handler_chains.rb +48 -0
- data/lib/awestruct/handlers/asciidoc_handler.rb +57 -0
- data/lib/awestruct/handlers/base_handler.rb +111 -0
- data/lib/awestruct/handlers/base_sass_handler.rb +42 -0
- data/lib/awestruct/handlers/coffeescript_handler.rb +48 -0
- data/lib/awestruct/handlers/erb_handler.rb +44 -0
- data/lib/awestruct/handlers/file_handler.rb +64 -0
- data/lib/awestruct/handlers/front_matter_handler.rb +85 -0
- data/lib/awestruct/handlers/haml_handler.rb +54 -0
- data/lib/awestruct/handlers/interpolation_handler.rb +28 -0
- data/lib/awestruct/handlers/layout_handler.rb +63 -0
- data/lib/awestruct/handlers/markdown_handler.rb +50 -0
- data/lib/awestruct/handlers/no_op_handler.rb +34 -0
- data/lib/awestruct/handlers/orgmode_handler.rb +48 -0
- data/lib/awestruct/handlers/page_delegating_handler.rb +54 -0
- data/lib/awestruct/handlers/restructuredtext_handler.rb +67 -0
- data/lib/awestruct/handlers/sass_handler.rb +21 -0
- data/lib/awestruct/handlers/scss_handler.rb +21 -0
- data/lib/awestruct/handlers/string_handler.rb +29 -0
- data/lib/awestruct/handlers/textile_handler.rb +58 -0
- data/lib/awestruct/handlers/yaml_handler.rb +25 -0
- data/lib/awestruct/layouts.rb +16 -0
- data/lib/awestruct/page.rb +141 -0
- data/lib/awestruct/page_loader.rb +82 -0
- data/lib/awestruct/pipeline.rb +56 -0
- data/lib/awestruct/site.rb +29 -35
- data/lib/awestruct/version.rb +1 -1
- data/lib/guard/awestruct.rb +38 -0
- metadata +115 -88
- data/lib/awestruct.rb +0 -2
- data/lib/awestruct/asciidoc_file.rb +0 -24
- data/lib/awestruct/asciidocable.rb +0 -35
- data/lib/awestruct/commands/frameworks/960/base_layout.html.haml +0 -10
- data/lib/awestruct/commands/frameworks/base_index.html.haml +0 -5
- data/lib/awestruct/commands/frameworks/base_pipeline.rb +0 -6
- data/lib/awestruct/commands/frameworks/blueprint/base_layout.html.haml +0 -12
- data/lib/awestruct/commands/frameworks/bootstrap/base_index.html.haml +0 -27
- data/lib/awestruct/commands/frameworks/bootstrap/base_layout.html.haml +0 -29
- data/lib/awestruct/commands/git_hub_pages.rb +0 -55
- data/lib/awestruct/commands/init.rb +0 -40
- data/lib/awestruct/commands/manifest.rb +0 -205
- data/lib/awestruct/erb_file.rb +0 -24
- data/lib/awestruct/erbable.rb +0 -19
- data/lib/awestruct/front_matter_file.rb +0 -54
- data/lib/awestruct/haml/filters/asciidoc.rb +0 -8
- data/lib/awestruct/haml_file.rb +0 -27
- data/lib/awestruct/hamlable.rb +0 -19
- data/lib/awestruct/markdown_file.rb +0 -23
- data/lib/awestruct/markdownable.rb +0 -18
- data/lib/awestruct/orgmode_file.rb +0 -23
- data/lib/awestruct/orgmodeable.rb +0 -15
- data/lib/awestruct/renderable.rb +0 -18
- data/lib/awestruct/renderable_file.rb +0 -39
- data/lib/awestruct/restructuredtext_file.rb +0 -23
- data/lib/awestruct/restructuredtextable.rb +0 -38
- data/lib/awestruct/sass_file.rb +0 -24
- data/lib/awestruct/sassable.rb +0 -33
- data/lib/awestruct/scss_file.rb +0 -24
- data/lib/awestruct/textilable.rb +0 -22
- data/lib/awestruct/textile_file.rb +0 -23
- data/lib/awestruct/verbatim_file.rb +0 -12
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
require 'awestruct/handlers/base_handler'
|
3
|
+
|
4
|
+
module Awestruct
|
5
|
+
module Handlers
|
6
|
+
class NoOpHandler < BaseHandler
|
7
|
+
|
8
|
+
def initialize(site)
|
9
|
+
super( site )
|
10
|
+
end
|
11
|
+
|
12
|
+
def output_filename
|
13
|
+
nil
|
14
|
+
end
|
15
|
+
|
16
|
+
def relative_source_path
|
17
|
+
nil
|
18
|
+
end
|
19
|
+
|
20
|
+
def stale?
|
21
|
+
false
|
22
|
+
end
|
23
|
+
|
24
|
+
def raw_content
|
25
|
+
nil
|
26
|
+
end
|
27
|
+
|
28
|
+
def rendered_content(context, with_layouts=true)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
|
2
|
+
require 'awestruct/handler_chain'
|
3
|
+
require 'awestruct/handlers/base_handler'
|
4
|
+
require 'awestruct/handlers/file_handler'
|
5
|
+
require 'awestruct/handlers/front_matter_handler'
|
6
|
+
require 'awestruct/handlers/interpolation_handler'
|
7
|
+
require 'awestruct/handlers/layout_handler'
|
8
|
+
require 'org-ruby'
|
9
|
+
|
10
|
+
module Awestruct
|
11
|
+
module Handlers
|
12
|
+
class OrgmodeHandler < BaseHandler
|
13
|
+
|
14
|
+
CHAIN = Awestruct::HandlerChain.new( /\.org$/,
|
15
|
+
Awestruct::Handlers::FileHandler,
|
16
|
+
Awestruct::Handlers::FrontMatterHandler,
|
17
|
+
Awestruct::Handlers::InterpolationHandler,
|
18
|
+
Awestruct::Handlers::OrgmodeHandler,
|
19
|
+
Awestruct::Handlers::LayoutHandler
|
20
|
+
)
|
21
|
+
|
22
|
+
def initialize(site, delegate)
|
23
|
+
super( site, delegate )
|
24
|
+
end
|
25
|
+
|
26
|
+
def simple_name
|
27
|
+
File.basename( relative_source_path, '.org' )
|
28
|
+
end
|
29
|
+
|
30
|
+
def output_filename
|
31
|
+
File.basename( relative_source_path, '.org' ) + '.html'
|
32
|
+
end
|
33
|
+
|
34
|
+
def output_extension
|
35
|
+
'.html'
|
36
|
+
end
|
37
|
+
|
38
|
+
def content_syntax
|
39
|
+
:orgmode
|
40
|
+
end
|
41
|
+
|
42
|
+
def rendered_content(context, with_layouts=true)
|
43
|
+
Orgmode::Parser.new(super( context, with_layouts) ).to_html
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
|
2
|
+
require 'awestruct/handlers/base_handler'
|
3
|
+
|
4
|
+
module Awestruct
|
5
|
+
module Handlers
|
6
|
+
class PageDelegatingHandler < BaseHandler
|
7
|
+
|
8
|
+
attr_accessor :page
|
9
|
+
|
10
|
+
def initialize(site, page)
|
11
|
+
super( site )
|
12
|
+
@page = page
|
13
|
+
end
|
14
|
+
|
15
|
+
def path
|
16
|
+
page.source_path
|
17
|
+
end
|
18
|
+
|
19
|
+
def inherit_front_matter(outer_page)
|
20
|
+
#page.prepare!
|
21
|
+
#page.handler.inherit_front_matter( outer_page )
|
22
|
+
end
|
23
|
+
|
24
|
+
def output_path
|
25
|
+
page.output_path
|
26
|
+
end
|
27
|
+
|
28
|
+
def relative_source_path
|
29
|
+
page.relative_source_path
|
30
|
+
end
|
31
|
+
|
32
|
+
def output_extension
|
33
|
+
page.output_extension
|
34
|
+
end
|
35
|
+
|
36
|
+
def stale?
|
37
|
+
page.stale?
|
38
|
+
end
|
39
|
+
|
40
|
+
def input_mtime(ignored)
|
41
|
+
page.input_mtime
|
42
|
+
end
|
43
|
+
|
44
|
+
def raw_content
|
45
|
+
page.raw_content
|
46
|
+
end
|
47
|
+
|
48
|
+
def rendered_content(context_ignored, with_layouts_ignored=true)
|
49
|
+
page.content( true )
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
|
2
|
+
require 'awestruct/handler_chain'
|
3
|
+
require 'awestruct/handlers/base_handler'
|
4
|
+
require 'awestruct/handlers/file_handler'
|
5
|
+
require 'awestruct/handlers/front_matter_handler'
|
6
|
+
require 'awestruct/handlers/interpolation_handler'
|
7
|
+
require 'awestruct/handlers/layout_handler'
|
8
|
+
|
9
|
+
require 'hpricot'
|
10
|
+
|
11
|
+
module Awestruct
|
12
|
+
module Handlers
|
13
|
+
class RestructuredtextHandler < BaseHandler
|
14
|
+
|
15
|
+
CHAIN = Awestruct::HandlerChain.new( /\.(adoc|asciidoc)$/,
|
16
|
+
Awestruct::Handlers::FileHandler,
|
17
|
+
Awestruct::Handlers::FrontMatterHandler,
|
18
|
+
Awestruct::Handlers::InterpolationHandler,
|
19
|
+
Awestruct::Handlers::RestructuredtextHandler,
|
20
|
+
Awestruct::Handlers::LayoutHandler
|
21
|
+
)
|
22
|
+
|
23
|
+
def initialize(site, delegate)
|
24
|
+
super( site, delegate )
|
25
|
+
end
|
26
|
+
|
27
|
+
def simple_name
|
28
|
+
File.basename( relative_source_path, '.rst' )
|
29
|
+
end
|
30
|
+
|
31
|
+
def output_filename
|
32
|
+
simple_name + output_extension
|
33
|
+
end
|
34
|
+
|
35
|
+
def output_extension
|
36
|
+
'.html'
|
37
|
+
end
|
38
|
+
|
39
|
+
def content_syntax
|
40
|
+
:rst
|
41
|
+
end
|
42
|
+
|
43
|
+
def rendered_content(context, with_layouts=true)
|
44
|
+
content = delegate.rendered_content( context, with_layouts )
|
45
|
+
|
46
|
+
hl = 1
|
47
|
+
if front_matter['initial_header_level'].to_s =~ /^[1-6]$/
|
48
|
+
hl = front_matter['initial_header_level']
|
49
|
+
end
|
50
|
+
rendered = ''
|
51
|
+
begin
|
52
|
+
doc = execute_shell( [ "rst2html",
|
53
|
+
"--strip-comments",
|
54
|
+
"--no-doc-title",
|
55
|
+
" --initial-header-level=#{hl}" ].join(' '),
|
56
|
+
content )
|
57
|
+
content = Hpricot( doc ).at( '/html/body/div[@class="document"]' ).inner_html.strip
|
58
|
+
content = content.gsub( "\r", '' )
|
59
|
+
rescue => e
|
60
|
+
puts e
|
61
|
+
puts e.backtrace
|
62
|
+
end
|
63
|
+
content
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
require 'awestruct/handler_chain'
|
3
|
+
require 'awestruct/handlers/base_sass_handler'
|
4
|
+
require 'awestruct/handlers/file_handler'
|
5
|
+
|
6
|
+
module Awestruct
|
7
|
+
module Handlers
|
8
|
+
class SassHandler < BaseSassHandler
|
9
|
+
|
10
|
+
CHAIN = Awestruct::HandlerChain.new( /\.sass$/,
|
11
|
+
Awestruct::Handlers::FileHandler,
|
12
|
+
Awestruct::Handlers::SassHandler
|
13
|
+
)
|
14
|
+
|
15
|
+
def initialize(site, delegate)
|
16
|
+
super( site, delegate, :sass )
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
require 'awestruct/handler_chain'
|
3
|
+
require 'awestruct/handlers/base_sass_handler'
|
4
|
+
require 'awestruct/handlers/file_handler'
|
5
|
+
|
6
|
+
module Awestruct
|
7
|
+
module Handlers
|
8
|
+
class ScssHandler < BaseSassHandler
|
9
|
+
|
10
|
+
CHAIN = Awestruct::HandlerChain.new( /\.scss$/,
|
11
|
+
Awestruct::Handlers::FileHandler,
|
12
|
+
Awestruct::Handlers::ScssHandler
|
13
|
+
)
|
14
|
+
|
15
|
+
def initialize(site, delegate)
|
16
|
+
super( site, delegate, :scss )
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'awestruct/handlers/base_handler'
|
2
|
+
|
3
|
+
module Awestruct
|
4
|
+
module Handlers
|
5
|
+
class StringHandler < BaseHandler
|
6
|
+
|
7
|
+
|
8
|
+
def initialize(site, content, output_extension='.html')
|
9
|
+
super( site )
|
10
|
+
@content = content
|
11
|
+
@output_extension = output_extension
|
12
|
+
end
|
13
|
+
|
14
|
+
def output_extension
|
15
|
+
@output_extension
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
def raw_content
|
20
|
+
@content
|
21
|
+
end
|
22
|
+
|
23
|
+
def rendered_content(context, with_layouts=true)
|
24
|
+
raw_content
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
|
2
|
+
require 'awestruct/handler_chain'
|
3
|
+
require 'awestruct/handlers/base_handler'
|
4
|
+
require 'awestruct/handlers/file_handler'
|
5
|
+
require 'awestruct/handlers/front_matter_handler'
|
6
|
+
require 'awestruct/handlers/interpolation_handler'
|
7
|
+
require 'awestruct/handlers/layout_handler'
|
8
|
+
require 'redcloth'
|
9
|
+
|
10
|
+
module Awestruct
|
11
|
+
module Handlers
|
12
|
+
class TextileHandler < BaseHandler
|
13
|
+
|
14
|
+
CHAIN = Awestruct::HandlerChain.new( /\.textile$/,
|
15
|
+
Awestruct::Handlers::FileHandler,
|
16
|
+
Awestruct::Handlers::FrontMatterHandler,
|
17
|
+
Awestruct::Handlers::InterpolationHandler,
|
18
|
+
Awestruct::Handlers::TextileHandler,
|
19
|
+
Awestruct::Handlers::LayoutHandler
|
20
|
+
)
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
def initialize(site, delegate)
|
25
|
+
super( site, delegate )
|
26
|
+
end
|
27
|
+
|
28
|
+
def simple_name
|
29
|
+
File.basename( relative_source_path, '.textile' )
|
30
|
+
end
|
31
|
+
|
32
|
+
def output_filename
|
33
|
+
File.basename( relative_source_path, '.textile' ) + '.html'
|
34
|
+
end
|
35
|
+
|
36
|
+
def output_extension
|
37
|
+
'.html'
|
38
|
+
end
|
39
|
+
|
40
|
+
def content_syntax
|
41
|
+
:textile
|
42
|
+
end
|
43
|
+
|
44
|
+
def rendered_content(context, with_layouts=true)
|
45
|
+
rendered = ''
|
46
|
+
# security and rendering restrictions
|
47
|
+
# ex. site.textile = ['no_span_caps']
|
48
|
+
restrictions = (site.textile || []).map { |r| r.to_sym }
|
49
|
+
# a module of rule functions is included in RedCloth using RedCloth.send(:include, MyRules)
|
50
|
+
# rule functions on that module are activated by setting the property site.textile_rules
|
51
|
+
# ex. site.textile_rules = ['emoticons']
|
52
|
+
rules = context.site.textile_rules ? context.site.textile_rules.map { |r| r.to_sym } : []
|
53
|
+
RedCloth.new( delegate.rendered_content( context, with_layouts ), restrictions ).to_html(*rules)
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
require 'awestruct/handlers/base_handler'
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
module Awestruct
|
6
|
+
module Handlers
|
7
|
+
class YamlHandler < BaseHandler
|
8
|
+
|
9
|
+
def initialize(site, delegate)
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
def front_matter
|
14
|
+
return @front_matter if @front_matter
|
15
|
+
@front_matter = YAML.load( delegate.raw_content )
|
16
|
+
@front_matter
|
17
|
+
end
|
18
|
+
|
19
|
+
def raw_content
|
20
|
+
nil
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
module Awestruct
|
3
|
+
|
4
|
+
class Layouts < Array
|
5
|
+
|
6
|
+
def find_matching(simple_name, output_extension)
|
7
|
+
# puts "find matching ( #{simple_name}, #{output_extension} )"
|
8
|
+
self.find{|e|
|
9
|
+
( e.simple_name == simple_name ) && ( e.output_extension == output_extension )
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
|
2
|
+
require 'awestruct/context'
|
3
|
+
|
4
|
+
require 'awestruct/handlers/no_op_handler'
|
5
|
+
require 'awestruct/handlers/page_delegating_handler'
|
6
|
+
require 'hashery/open_cascade'
|
7
|
+
require 'ostruct'
|
8
|
+
require 'awestruct/astruct'
|
9
|
+
|
10
|
+
module Awestruct
|
11
|
+
|
12
|
+
class Page < Awestruct::AStruct
|
13
|
+
|
14
|
+
attr_accessor :site
|
15
|
+
attr_accessor :handler
|
16
|
+
attr_reader :dependencies
|
17
|
+
|
18
|
+
def initialize(site, handler=nil)
|
19
|
+
@site = site
|
20
|
+
case (handler)
|
21
|
+
when Page
|
22
|
+
@handler = Awestruct::Handlers::LayoutHandler.new( site, Awestruct::Handlers::PageDelegatingHandler.new( site, handler ) )
|
23
|
+
when nil
|
24
|
+
@handler = Awestruct::Handlers::NoOpHandler.new( site )
|
25
|
+
else
|
26
|
+
@handler = handler
|
27
|
+
end
|
28
|
+
@dependencies = Awestruct::Dependencies.new( self )
|
29
|
+
end
|
30
|
+
|
31
|
+
def prepare!
|
32
|
+
handler.inherit_front_matter( self )
|
33
|
+
end
|
34
|
+
|
35
|
+
def inspect
|
36
|
+
"Awestruct::Page{ #{self.object_id}: output_path=>#{output_path}, source_path=>#{source_path}, layout=>#{layout} }"
|
37
|
+
end
|
38
|
+
|
39
|
+
def create_context(content='')
|
40
|
+
context = Awestruct::Context.new( :site=>site, :page=>self, :content=>content )
|
41
|
+
site.engine.pipeline.mixin_helpers( context )
|
42
|
+
context
|
43
|
+
end
|
44
|
+
|
45
|
+
def inherit_front_matter_from(hash)
|
46
|
+
hash.each do |k,v|
|
47
|
+
unless ( key?( k ) )
|
48
|
+
self[k.to_sym] = v
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def relative_source_path
|
54
|
+
@relative_source_path || handler.relative_source_path
|
55
|
+
end
|
56
|
+
|
57
|
+
def relative_source_path=(path)
|
58
|
+
@relative_source_path = path
|
59
|
+
end
|
60
|
+
|
61
|
+
def simple_name
|
62
|
+
handler.simple_name
|
63
|
+
end
|
64
|
+
|
65
|
+
def output_path
|
66
|
+
(@output_path || handler.output_path).to_s
|
67
|
+
end
|
68
|
+
|
69
|
+
def output_path=(path)
|
70
|
+
case ( path )
|
71
|
+
when Pathname then @output_path = path
|
72
|
+
else @output_path = Pathname.new( path )
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def output_extension
|
77
|
+
handler.output_extension
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
def source_path
|
82
|
+
handler.path.to_s
|
83
|
+
end
|
84
|
+
|
85
|
+
def stale?
|
86
|
+
handler.stale? || @dependencies.dependencies.any?(&:stale?)
|
87
|
+
end
|
88
|
+
|
89
|
+
def stale_output?(output_path)
|
90
|
+
return true if ! File.exist?( output_path )
|
91
|
+
return true if input_mtime > File.mtime( output_path )
|
92
|
+
false
|
93
|
+
end
|
94
|
+
|
95
|
+
def input_mtime
|
96
|
+
handler.input_mtime( self )
|
97
|
+
end
|
98
|
+
|
99
|
+
def collective_dependencies_mtime
|
100
|
+
t = nil
|
101
|
+
@dependencies.each do |e|
|
102
|
+
if ( t == nil )
|
103
|
+
t = e.mtime
|
104
|
+
elsif ( t < e.mtime )
|
105
|
+
t = e.mtime
|
106
|
+
end
|
107
|
+
end
|
108
|
+
t
|
109
|
+
end
|
110
|
+
|
111
|
+
def all_dependencies
|
112
|
+
@dependencies + handler.dependencies
|
113
|
+
end
|
114
|
+
|
115
|
+
def content_syntax
|
116
|
+
handler.content_syntax
|
117
|
+
end
|
118
|
+
|
119
|
+
def raw_content
|
120
|
+
handler.raw_content
|
121
|
+
end
|
122
|
+
|
123
|
+
def rendered_content(context=create_context(), with_layouts=true)
|
124
|
+
Awestruct::Dependencies.push_page( self ) if context.site.config.track_dependencies
|
125
|
+
c = handler.rendered_content( context, with_layouts )
|
126
|
+
Awestruct::Dependencies.pop_page if context.site.config.track_dependencies
|
127
|
+
site.engine.pipeline.apply_transformers( site, self, c )
|
128
|
+
end
|
129
|
+
|
130
|
+
def content(with_layouts=false)
|
131
|
+
rendered_content( create_context(), with_layouts )
|
132
|
+
end
|
133
|
+
|
134
|
+
def ==(other_page)
|
135
|
+
self.object_id == other_page.object_id
|
136
|
+
end
|
137
|
+
|
138
|
+
|
139
|
+
end
|
140
|
+
|
141
|
+
end
|