Module: Pullentity::Client::MiddlemanConfig
- Defined in:
- lib/pullentity-client/helpers.rb
Class Method Summary collapse
- .location ⇒ Object
- .registered(app) ⇒ Object (also: included)
- .site_name ⇒ Object
- .theme_name ⇒ Object
Class Method Details
.location ⇒ Object
103 104 105 |
# File 'lib/pullentity-client/helpers.rb', line 103 def location @location ||= Pathname.new(Dir.pwd) end |
.registered(app) ⇒ Object Also known as: included
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/pullentity-client/helpers.rb', line 64 def registered(app) app.helpers Pullentity::Client::Helpers app.set :site_name, site_name app.set :theme_name, theme_name app.set :sass_assets_paths, [] app.set :relative_links, false app.set :images_dir, "assets/images" app.set :fonts_dir, "assets/fonts" app.set :css_dir, "assets/stylesheets" app.set :js_dir, "assets/javascripts" app.set :markdown, :layout_engine => :haml app.set :default_encoding, 'utf-8' app.configure :build do if target?(:pullentity) activate :minify_css activate :minify_javascript app.set :http_prefix, "#{URL_REMOTE}" app.set :images_dir, "/uploads/theme_asset/#{site_name}/theme/#{theme_name}/assets" end end app.use Rack::Rewrite do r301 %r{/sections(.*)}, '/' r301 %r{/projects(.*)}, '/' end end |
.site_name ⇒ Object
93 94 95 96 |
# File 'lib/pullentity-client/helpers.rb', line 93 def site_name hsh = YAML.load_file(location + "pullentity.yml") hsh["site"] end |
.theme_name ⇒ Object
98 99 100 101 |
# File 'lib/pullentity-client/helpers.rb', line 98 def theme_name hsh = YAML.load_file(location + "pullentity.yml") hsh["theme_name"] end |