Project

toto-bongo

0.0
No commit activity in last 3 years
No release in over 3 years
Minimal blog to use with your existing app
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

Toto bongo

Minimal blog forked from toto to use for your existing app's. This is very useful for SEO optimization See http://toto-bongo.heroku.com/

Introduction

Toto-bongo is a git-powered, minimalist blog engine forked from toto. There is no toto client, and there probably will never be, everything goes through git. From the security stand point, this makes toto-bongo very secure. By reducing the attack surface( we don't handle any user input) we've made a blog you can trust. Other blogs have administration panels, sessions, cookies etc, that lead to security vulnerabilities, toto-bongo has non of that.

blog in your app in 10 seconds

This is how to deploy in your existing app:

  1. git clone git@github.com:danpal/toto-bongo-blog.git

  2. Look at toto-bongo-blog Gemfile, add the following gems to your Gemfile.

  • gem 'toto-bongo'

  • gem 'RedCloth'

  • gem 'haml'

  • gem 'sass' #if you want to use the sass stylesheet

  1. Replace the config.ru on your application to the one from toto-bongo-blog. Then modify accordingly.

    Toto-bongo runs on rack, you need to modify your existing config.ru we provide you with an already existing config.ru, take a look at toto-bongo-blog config.ru

make the following changes 1. Change :title 2. Run TotoBongoBlog::Application #change for your application name

  1. Copy the blog directory into your application root folder.

  2. Copy the blog.sass stylesheet or blog.css from /public/stylesheets/sass/blog.sass or /public/stylesheets/sass/blog.css to your app stylesheets.

You are done.

how it works

  • content is entirely managed through git; you get full fledged version control for free.
  • articles are stored as .txt files, with embeded metadata (in yaml format).
  • articles are processed through a textile converter(RedCloth) by default.
  • templating is done through HAML.
  • toto is built right on top of Rack.
  • toto was built to take advantage of HTTP caching.
  • toto was built with heroku in mind.
  • comments are handled by disqus
  • individual articles can be accessed through urls such as /2009/11/21/blogging-with-toto
  • the archives can be accessed by year, month or day, wih the same format as above.
  • arbitrary metadata can be included in articles files, and accessed from the templates.
  • summaries are generated intelligently by toto, following the :max setting you give it.
  • you can also define how long your summary is, by adding ~ at the end of it (:delim).

toto-blog

deployment

Toto is built on top of Rack, and hence has a rackup file: config.ru.

on your own server

Once you have created the remote git repo, and pushed your changes to it, you can run toto with any Rack compliant web server, such as thin, mongrel or unicorn.

With thin, you would do something like:

$ thin start -R config.ru

With unicorn, you can just do:

$ unicorn

configuration

You can configure toto, by modifying the config.ru file. For example, if you want to set the blog author to 'John Galt', you could add set :author, 'John Galt' inside the Toto::Server.new block. Here are the defaults, to get you started:

set :author,      ENV['USER']                               # blog author
set :title,       Dir.pwd.split('/').last                   # site title
set :url,         'http://example.com'                      # site root URL
set :prefix,      'blog'                                        # common path prefix for all pages
set :root,        "index"                                   # page to load on /
set :date,        lambda {|now| now.strftime("%d/%m/%Y") }  # date format for articles
set :disqus,      false                                     # disqus id, or false
set :summary,     :max => 150, :delim => /~\n/              # length of article summary and delimiter
set :ext,         'txt'                                     # file extension for articles
set :cache,       28800                                     # cache site for 8 hours

set :to_html   do |path, page, ctx|                         # returns an html, from a path & context
  ERB.new(File.read("#{path}/#{page}.rhtml")).result(ctx)
end

set :error     do |code|                                    # The HTML for your error page
  "<font style='font-size:300%'>toto-bongo, error (#{code})</font>"
end

Development

rake gemspec: To generate the gemspec gem build toto-bongo.gemspec to build

If you are developing use the following enviromental variable to get some debugging output export TOTODEBUG=true

thanks

To toto team, as they are the real developers behind toto.