Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
Added base content. How bonsai works and getting started.
Browse files Browse the repository at this point in the history
  • Loading branch information
benschwarz committed Dec 24, 2009
1 parent d8d0e20 commit a07ef41
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
13 changes: 13 additions & 0 deletions content/1.how-bonsai-works/default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:title: How bonsai works
:body: |
<p>Bonsai uses a set of very simple conventions to handle content and templating.</p>
<h3>Content</h3>
<p>All content is stored on the file system in the "content" directory, the folder paths that you use will imply the paths used on the final web site.</p>
<p>For example, a page that was kept under <code>content/about-us/services</code> will have a permalink of "/about-us/services".</p>
<p>For a page to be recognised, you'll need a <code>template-name.yml</code> file. The "template-name" section of the file name referrers to the template that will be used to render your page.</p>
<h3>Templates</h3>
<p>Templates are kept in the "templates" directory. All templates are rendered using <a href="http://github.com/defunkt/mustache">mustache</a> for documentation about more specific templating, check the mustache readme or google group.</p>
<h3></h3>
24 changes: 24 additions & 0 deletions content/2.getting-started/default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:title: Getting started with Bonsai
:body: |
<p>To run Bonsai you will need Ruby and Rubygems. If you're using a Mac the good news is that Ruby and Rubygems will already been installed.</p>
<p>To install Bonsai, open your Terminal and run <code>sudo gem install bonsai</code>.</p>
<p>Once installed typing <code>bonsai --help</code> will display a list of available options.</p>
<pre>
<code>
> bonsai --help
盆栽
bonsai, tiny and beautiful
--plant [NAME] creates the directory structure for your site
--repot export your site
--cultivate run a local web server and process your files on save
--version
--console start an IRB console session giving you access to your bonsai environment
</code>
</pre>
<p>To create the required framework for your new site, use <code>bonsai --plant jasper</code>, the generator will create your framework in <code>./jasper</code>. </p>
<p>To have a running webserver of your site while you develop it, run <code>bonsai --cultivate</code> from within your generated framework (<code>cd ./jasper</code>). A web server will start on port 5000, navigate to <a href="http://localhost:5000/">localhost</a> and get hacking</p>
<p>When you save, add or remove files <code>bonsai --cultivate</code> will process your files, images, js, and css will be rendered into the <code>output</code> directory. This is so that they can be served using relative paths.</p>
5 changes: 5 additions & 0 deletions content/index/default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:title: Forward
:body: |
Bonsai is a static web site generator that is designed to keep a clear seperation between your content and templates. It aims to be elegant and follow best web practices.
Build your site, run a generator, upload. Job done.

0 comments on commit a07ef41

Please sign in to comment.