Site structure - what are all these files?

When you create a site in Blueprint, a new folder appears in blueprint/sites labelled with the domain name of the new site. The contents of the folder will look something like this:

site_structure

In order, the folder contains:

  • The blueprints directory (within which live the templates for each of the blueprints you've selected for your site - we'll come to that in a minute)
  • error.html.erb, which is a template within which you can serve up all your different error messages - 404, 500, 501 and so forth.
  • The images directory, which is where you'll place all the design-level images, .swf files, and so forth that your site requires
  • The ingredients directory – here's some more about ingredients.
  • layout.html.erb - the scaffolding, containing anything that's shown on more or less every page of your site - navigation, masthead, footer, and the outermost bits of HTML in all likelihood - you can read more about layout here.
  • The lib directory, for any site-specific rake tasks you might build
  • The scripts directory, for javascript files
  • style.css , your stylesheet (which already contains generic styles for lots of the default blueprints)
  • the styles directory, which will eventually be the default home for all stylesheets.

Drilling down into the blueprints directory, you'll see that every blueprint you've selected for your site has its own folder. By default, these folders contain a template for every action in the controller for that blueprint. Here's an example:

nws

There's plenty more to say about templates and the structure of blueprints.

User notes

(You can add notes to this page using the form below.)


Only the note field is required.

Preview or