Permalink
Browse files

Merge branch 'customization_support'

  • Loading branch information...
Jed Hurt
Jed Hurt committed May 22, 2008
2 parents 44641de + 058ab2a commit 915b3a6f05cf4e790de0a85e4f070102574f6c0a
@@ -4,3 +4,4 @@ log/*.log
db/*.sqlite3
config/database.yml
config/spam_protection.yml
config/collective.yml
@@ -8,7 +8,7 @@ def highlighted_link_to(title, url)
def title(options)
if(options.is_a?(Hash))
merged_title = @site_title = options[:site]
merged_title = @site_title = options[:site].dup
(merged_title << " | #{@page_title}") if @page_title
return merged_title
else
@@ -1,13 +1,13 @@
!!! Strict
%html{ 'xml:lang' => 'en-us', :lang => 'en-us', :xmlns => 'http://www.w3.org/1999/xhtml' }
%head
%title= title :site => 'Merb Wiki'
%title= title :site => Collective.title
%meta{ :content => 'text/html; charset=utf-8', 'http-equiv' => "content-type" }/
= css_include_tag :reset, :master, :default_theme
= css_include_tag :reset, :master, *Collective.stylesheets
%body
#header
#branding
%h1 Merb
%h1= Collective.title
%ul#navigation
%li= highlighted_link_to 'Home', url(:home)
%li= highlighted_link_to 'All Pages', url(:pages)
@@ -21,8 +21,7 @@
= part RecentUpdatesPart => :index
#footer
%p
&copy;2006, Ezra Zygmuntowicz | Merb is released under the
%a{ :href => 'http://www.opensource.org/licenses/mit-license.php' } MIT License
= Collective.footer
| Wiki powered by
%a{ :href => 'http://github.com/meekish/collective' } Collective
= js_include_tag :jquery, 'jquery-curvycorners', :application, 'chili/chili.pack.js'
@@ -0,0 +1,6 @@
---
:title: Collective Wiki
:stylesheets:
- default_theme
# - custom_theme
:footer: "&copy;2010, John Doe"
@@ -0,0 +1,16 @@
require 'ostruct'
require 'fileutils'
Merb::BootLoader.before_app_loads do
config_path = Merb.root / 'config' / 'collective.yml'
if File.exists?(config_path)
Collective = OpenStruct.new(YAML.load_file(config_path))
else
FileUtils.cp(Merb.root / 'config' / 'collective.yml.sample', config_path)
Merb.logger.error! "No collective.yml file found in #{Merb.root}/config."
Merb.logger.error! "A sample file was created called collective.yml for you to edit."
exit(1)
end
end

0 comments on commit 915b3a6

Please sign in to comment.