Home > sheBe

sheBe

SheBe is a project mainly written in RUBY and JAVASCRIPT, it's free.

A Simple HEroku Blogging Engine

== sheBe sheBe is a Simple HEroku Blogging Engine. More info about heroku here, http://heroku.com

Features:

  • Ultra simple blogging engine that you can clone and deploy to heroku in less then a minute
  • Uses textile for blog posts
  • Supports tagging of posts
  • Supports RSS out of the box
  • Super minimalist white page look - see http://blog.cbright.co.uk for an example
  • All done in HAML - for info at http://haml-lang.com/

This documentation assumes that you already have a Heroku account setup.

== Initial Setup It takes 7 commands and less than a minute to get started:

git clone [email protected]:chris-cbright/sheBe.git sheBe cd sheBe heroku create git push heroku master heroku rake db:migrate heroku restart heroku open

But you'll probably want to change the default admin cookie and password, otherwise anyone can login. You need to manually edit the file /config/appconfig.yml to do this:

admin_cookie: "replace_this" admin_password: "replace_this"

  • Change admin_cookie to a hard to guess random string - if you like, go to script/console and enter ActiveSupport::SecureRandom.hex(16) , then copy and paste into the file.

  • Change admin_password to your favourite password

== Use of sheBe

  • The admin login is at /login. By default admin stays logged in for 1 year.
  • Everything else should be self-explanatory

== Adding Google Analytics to sheBe Modify the template at /app/views/layouts/application.html.haml, cutting and pasting your tracker code as in this example:

!!! %head %title A New sheBe Blog = auto_discovery_link_tag(:rss, rss_posts_url) = stylesheet_link_tag :all, :cache => true %body#home

container

    = yield
    #footer
        %p.rights
            Powered by sheBe
 :javascript
      var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
      document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js'; type='text/javascript'%3E%3C/script%3E"));
      </script>
      <script type="text/javascript">
      try {
      var pageTracker = _gat._getTracker("UA-SECRET_CODE-0");
      pageTracker._trackPageview();
      } catch(err) {}

== Adding Discus comments to sheBe Modify the view at /app/views/posts/show.html.haml, cutting and pasting your Discus code as in this exampe:

header

%p
    = link_to "cBright UK", about_path
%h1#title
    = @post.title
%p.date
    = @post.created_at.strftime("%A, %B %d, %Y")

content.entry

#body
    = @post.content
#appendix
    %p.tags
        = link_to "View all posts", posts_path
        or more posts on
        = tag_link_list(@post)

disqus_thread

:javascript (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'http://YOUR_DOMAIN.disqus.com/embed.js';; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();

  • if is_admin? .admin Administrator : = link_to "new post", new_post_path , = link_to "edit post", edit_post_path(@post) , = link_to "delete post", post_path(@post), :method=>:delete

== License

  • Concept taken from "Scanty":http://github.com/adamwiggins/scanty
  • CSS - creative commons licensed - http://creativecommons.org/licenses/by-sa/2.5/ - by Ryan Tomayko - http://tomayko.com/about
  • Code - creative commons licensed - http://creativecommons.org/licenses/by-sa/2.5/ - by cBright UK - http://cbright.co.uk
Previous:Lucullus