Skip to content

Commit

Permalink
Added page_title implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Sep 2, 2011
1 parent d1b1adc commit 0c513b4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/toto.rb
Expand Up @@ -172,7 +172,7 @@ class Context
attr_reader :env, :tags_cloud

def initialize ctx = {}, config = {}, path = "/", env = {}
@config, @context, @path, @env = config, ctx, path, env
@config, @context, @path, @env, @page_title = config, ctx, path, env, []
@articles = Site.articles(@config[:ext]).reverse.map do |a|
Article.new(a, @config)
end
Expand Down Expand Up @@ -203,10 +203,12 @@ def method_missing m, *args, &blk
end

def page_title! str
@page_title << str
str
end

def page_title
[]
@page_title.dup
end
end
end
Expand Down

0 comments on commit 0c513b4

Please sign in to comment.