Commits

James Sumners committed b7508f4

Updated the documentation based on some feedback.

  • Participants
  • Parent commits 42e2339

Comments (0)

Files changed (1)

 
 njsBaker is a **simple** compiler for static HTML web sites. A complete rebuild of Make/rake/Ant/Maven/gant/Easy Bake Oven/whatever *this is not*.
 
-So why another tool along those lines? A lot of times a dynamic server side scripting language is overkill. But no one wants to copy and paste HTML for a page being added to a site. And they certainly don't want to go back and edit the site-wide navigation on every page when it changes. Which means you'll say "screw that" and use PHP/Ruby/Python/Perl/etc. just to make maintaing the site easier, because who wants to go back to Server Side Includes, right?
+So why another tool along those lines? A lot of times a dynamic server side scripting language is overkill. But no one wants to copy and paste HTML for a page being added to a site. And they certainly don't want to go back and edit the site-wide navigation on every page when it changes. Which means you'll say "screw that" and use PHP/Ruby/Python/Perl/etc. just to make maintaining the site easier. Because who wants to go back to Server Side Includes, right?
 
-Well, screw that noise, too. njsBaker is designed specifically to make maintaining simple static sites easy. Additionally, it keeps the language requirements down. You're probably already writing JavaScript for your web site. So why switch over to something else for a tool like this? Keep it simple.
+Well, screw that noise. njsBaker is designed specifically to make maintaining simple static sites easy. Additionally, it keeps the language requirements down. You're probably already writing JavaScript for your web site. So why switch over to something else for a tool like this? Keep it simple.
+
+## Install/Usage ##
+
+[Node.js](http://nodejs.org/) is required.
+
+1. `hg clone https://bitbucket.org/jsumners/njsbaker` (or download the [latest tarball](https://bitbucket.org/jsumners/njsbaker/get/tip.tar.bz2))
+2. `npm -g install njsbaker` (where "njsbaker" is your cloned source tree)
+3. Create a project with a Baker.json (described below)
+4. From the project root: `njsBaker Baker.json`
+
+There is an [example project](https://bitbucket.org/jsumners/njsbaker/src/tip/example) included in the Mercurial repository.
 
 ## How Does It Work? ##
 
 
 njsBaker reads the JSON file, loads the template files it describes from the template directory, and writes the compiled HTML files to the build directory.
 
-By default, njsBaker will look for a "Baker.json" file in the project directory. However, you can also supply another filename, e.g. `node njsBaker.js myBaker.json`.
+By default, njsBaker will look for a "Baker.json" file in the project directory. However, you can also supply another filename, e.g. `njsBaker myBaker.json`.
 
 **Note:** you must run njsBaker from the root project directory.
 
 
 *	*content* token (**required**): Every template will have tokens that are to be replaced by njsBaker. There is only one required token name -- "content".
 
-* 	*config* object (**required**): The *config* object defines the two directories that will be used during compilation. In this example, all templates reside in a directory named "templates" and the resulting HTML will be written to the directory named "build". Additionally, the templates will have tokens that are delimited by "{{" and "}}". For example, "{{content}}" will be replace with page content.
+* 	*config* object (**required**): The *config* object defines the two directories that will be used during compilation. In this example, all templates reside in a directory named "templates" and the resulting HTML will be written to the directory named "build". Additionally, the templates will have tokens that are delimited by "{{" and "}}". For example, "{{content}}" will be replaced with page content.
 
 *	*snippets* object (**required**): The *snippets* object maps the *content* token in each template to the snippet in the config.templateDir that contains the content for said template. So, each key on this object points to a file in the config.templateDir. If you prefer some organization in your templates directory, the key's value can be a relative path. So, you could have "foo/bar.html" as the value.