Ruby on Rails project to create websites where everything is a document
JavaScript Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Just Documents


Web site creation done just with documents (except for the users and comments…).

Just Documents provides an empty Ruby on Rails document orientated application designed to be a base for your own project.


Instalation assumes basic knowledge of Rails project development, although the process is pretty straight forward, there is no fancy Admin instalation interface.

Grab yourself a copy of JustDocuments using git:

git clone git:// your_project

You can then prepare the database:

cd your_project rake db:migrate

The default settings will create an sqlite database file in the usual Rails location. After creating the tables the empty project is ready, just start the server using:


You should be able to access the server on:


The site will clearly be empty, so the first step is to create a new admin account to start adding pages and developing your own theme. Start by accessing the login screen:


Just Documents uses OpenID for authorizing users, enter your OpenID url in the login page and you provided a new screen to enter your user details. A notice should appear letting you know that the first user you create will be an admin user.

Once logged in, go back to the site and you should be able to see a set of buttons to create a new Document. Documents are created in a similar fashion to a Wiki, just provide the URL and you’ll be given the option to create the document. The themes section provides more details about how this works.


Themes are a key part of Just Documents, they allow a great amount of flexibility when creating your project and help make the “everythings a document” paradigm work.

Just Documents provides a default theme found in the /app/views/themes/default directory. To create your own theme, just create a new directory alongside the default theme and activate it by setting the new name in the prepare theme method in the application controller:

  def prepare_theme
    @current_theme = "new_theme"

Themes are clever, if your new theme does not contain the view requested, Just Documents will resort to the default theme. This allows you to replace parts of the default theme one peice at a time. Its not recommended that you make changes to the default theme, future updates or changes to Just Documents could cause conflicts and break an otherwise smooth update process.

The directories contained in the theme relate to the applications controllers. The documents directory is split into sub-directories which coincide with the names of document layouts.

Document layouts are another key part of Just Documents, they define how a document should be presented and edited. The default layouts are:

  • page – a simple page with support for child documents in a side bar.
  • blog – a blog with posts in the middle and a side bar at the right.
  • blog_entry – entries in a blog page.
  • side_bar_entry – small boxes usually show at the side of the site.
  • collection – similar to a blog, but for ordered information.
  • collection_entry – an item contained in a collection.

New layouts can be added by creating a new directory inside your new theme’s documents directory. To be able to create a new document using a new layout, the easiest way is to add a new button to the special _not_found.html.haml view. If a document is not found, the website shows the contents of this view and allows an editor to create a new document by clicking the button that matches their requirements.


Currently, the system supports three roles, normal user, ‘editor’, and ‘admin’. A normal user can’t really do anything other than the fact that their comments
will be published instantly (this might become an option in the future). An editor is allowed to create, edit, and manage documents, but they cannot delete anything.
An admin can do anything.


Just Documents is prepared for i18n from the get-go and uses the Rails standard I18n code. To enable aditional translations, add a locale file to the Rails config/locales directory.

Sven Fuchs’s awesome routing-filter plugin is used to add the locale magically to all URLs.


A few of the resources used in this application

  • Fugue Icons – Copyright © 2009 Yusuke Kamiyamane.
    Creative Commons Attribution 3.0 License