Project

hanmoto

0.02
Low commit activity in last 3 years
No release in over a year
Hanmoto provides a simple way to manage public pages with Asset Pipeline.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 6.1.0
 Project Readme

Hanmoto

Public pages management with Asset Pipeline.

Inspired by gakubuchi.

Usage

In app/views/public_pages/404.html.haml:

- provide(:title, 'Not found')
%h1 Not found
%p This webpage is not found.
%p= link_to 'Home', root_path

In app/views/public_pages/500.html.haml:

- provide(:title, 'Server error')
%h1 Server error
%p This webpage is not working.

In app/views/public_pages/robots.text.erb:

<% unless Rails.env.production? %>
User-Agent: *
Disallow: /
<% end %>

In app/views/layout/public.html.haml:

!!!
%html
  %head
    %title #{yield(:title)} | MyAPP
    = stylesheet_link_tag 'application', media: 'all'
    = favicon_link_tag '/favicon.ico'
  %body
    = yield

Compile the templeate with:

rake assets:precompile

or

rake hanmoto:publish

This will generate public/404.html, public/500.html, and public/robots.txt.

Installation

Add this line to your application's Gemfile:

gem 'hanmoto'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hanmoto

Configuration

In config/initializers/hanmoto.rb, you can configure the following values.

Hanmoto.configure do |config|
#   config.view_dir = 'public_page'
#   config.layouts = {
#     html: 'public',
#   }
end

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.