<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/views/manual/manual_subsection.dryml</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -6,4 +6,5 @@ vendor/plugins/footnotes-edge
 tmtags
 app/views/taglibs/auto
 public/img/*
+manual/generators/*.markdown
 </diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,28 +1,56 @@
 class ManualController &lt; ApplicationController
   
   caches_page :index, :manual_section, :manual_subsection
+
+  def self.create_ordered_hash(llist)
+    hash = ActiveSupport::OrderedHash.new
+    llist.each do |key, value|
+      hash[key] = value
+    end
+    hash
+  end
   
-  TITLES = begin
-             titles = ActiveSupport::OrderedHash.new
-             [['to-do',        &quot;To Do List&quot;],
-              ['dryml-guide',  &quot;The DRYML Guide&quot;],
-              ['permissions',  &quot;The Permission System&quot;],
-              ['controllers',  &quot;Controllers and Routing&quot;],
-              ['lifecycles',   'Lifecycles'],
-              ['viewhints',    'View Hints'],
-              ['scopes',       'Automatic Named Scopes'],
-              ['hobosupport',  'Hobo Support'],
-              ['hobofields',   'Hobo Fields']
-             ].each do |title, desc|
-                      titles[title] = desc
-                    end
-             titles
-           end
-  
+  TITLES = self.create_ordered_hash([['to-do',        &quot;To Do List&quot;],
+                                     ['dryml-guide',  &quot;The DRYML Guide&quot;],
+                                     ['permissions',  &quot;The Permission System&quot;],
+                                     ['controllers',  &quot;Controllers and Routing&quot;],
+                                     ['lifecycles',   'Lifecycles'],
+                                     ['viewhints',    'View Hints'],
+                                     ['scopes',       'Automatic Named Scopes'],
+                                     ['hobosupport',  'Hobo Support'],
+                                     ['hobofields',   'Hobo Fields'],
+                                     ['generators',   'Generators'],
+                                    ])
+
+  SUBTITLES = {
+    'hobofields' =&gt; self.create_ordered_hash([['rich_types',         'Rich Types'],
+                                              ['hobofields_api',     'API'],
+                                              ['migration_generator','Migration Generator']]),
+    'hobosupport' =&gt; self.create_ordered_hash([['enumerable',        'Enumerable'],
+                                               ['hash',              'Hash'],
+                                               ['implies',           'Implies'],
+                                               ['metaid',            'Metaid'],
+                                               ['methodphitamine',   'Methodphitamine'],
+                                               ['module',            'Module']]),
+    'generators' =&gt; self.create_ordered_hash([['hobo',                  'hobo'],
+                                              ['hobo_rapid',            'hobo_rapid'],
+                                              ['hobo_model',            'hobo_model'],
+                                              ['hobo_model_controller', 'hobo_model_controller'],
+                                              ['hobo_model_resource',   'hobo_model_resource'],
+                                              ['hobo_front_controller', 'hobo_front_controller'],
+                                              ['hobo_user_model',       'hobo_user_model'],
+                                              ['hobo_user_controller',  'hobo_user_controller'],
+                                              ['hobo_subsite',          'hobo_subsite'],
+                                              ['hobo_admin_site',       'hobo_admin_site'],
+                                              ['hobofield_model',       'hobofield_model'],
+                                              ['hobo_migration',        'hobo_migration']])
+  }
+
   def manual_section
     section      = params[:section].gsub(/[^a-z_\-]/, '')
     filename     = &quot;manual/#{section}.markdown&quot;
     @title       = TITLES[section]
+    @subtitles   = SUBTITLES[section]
     @content     = HoboFields::MarkdownString.new(File.read(&quot;#{RAILS_ROOT}/#{filename}&quot;))
     @last_update = last_update filename
   end
@@ -32,6 +60,8 @@ class ManualController &lt; ApplicationController
     subsection   = params[:subsection].gsub(/[^a-z_\-]/, '')
     filename     = &quot;manual/#{section}/#{subsection}.markdown&quot;
     @title       = TITLES[section]
+    @subtitles   = SUBTITLES[section]
+    @current_subtitle    = SUBTITLES[section][subsection]
     @content     = HoboFields::MarkdownString.new(File.read(&quot;#{RAILS_ROOT}/#{filename}&quot;))
     @last_update = last_update filename
   end</diff>
      <filename>app/controllers/manual_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
   &lt;body: class=&quot;manual&quot;/&gt;
   
   &lt;aside-content:&gt;
-    &lt;left-navigation with=&quot;&amp;ManualController::TITLES&quot; title=&quot;Manual&quot; url=&quot;#{base_url}/manual&quot; current=&quot;&amp;@title&quot; /&gt;
+    &lt;left-navigation with=&quot;&amp;ManualController::TITLES&quot; title=&quot;Manual&quot; url=&quot;#{base_url}/manual&quot; current=&quot;&amp;@title&quot; subtitles=&quot;&amp;@subtitles&quot; /&gt;
   &lt;/aside-content:&gt;
   
   &lt;content:&gt;</diff>
      <filename>app/views/manual/manual_section.dryml</filename>
    </modified>
    <modified>
      <diff>@@ -246,11 +246,19 @@
 &lt;/def&gt;
 
 
-&lt;def tag=&quot;left-navigation&quot; attrs=&quot;current, title, url&quot;&gt;
+&lt;def tag=&quot;left-navigation&quot; attrs=&quot;current, title, subtitles, current-subtitle, url&quot;&gt;
   &lt;h2&gt;&lt;a href=&quot;&amp;url&quot;&gt;&lt;%= title %&gt;&lt;/a&gt;&lt;/h2&gt;
   &lt;navigation current=&quot;&amp;current&quot;&gt;
     &lt;repeat&gt;
       &lt;nav-item href=&quot;#{url}/#{this_key}&quot;&gt;&lt;%= this %&gt;&lt;/nav-item&gt;
+      &lt;ul if=&quot;&amp;current == this&quot;&gt;
+        &lt;% current_title = this_key -%&gt;
+        &lt;repeat with=&quot;&amp;subtitles&quot;&gt;
+          &lt;li class=&quot;#{'current' if this==current_subtitle}&quot;&gt;
+            &lt;a href=&quot;#{url}/#{current_title}/#{this_key}&quot;&gt;&lt;%= this %&gt;&lt;/a&gt;
+          &lt;/li&gt;
+        &lt;/repeat&gt;
+      &lt;/ul&gt;
     &lt;/repeat&gt;
   &lt;/navigation&gt;
 &lt;/def&gt;</diff>
      <filename>app/views/taglibs/application.dryml</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,19 @@ namespace :cookbook do
     end
   end
 
+  desc &quot;Rebuild generator documentation&quot;
+  task :rebuild_generator_docs =&gt; :environment do
+    ManualController::SUBTITLES['generators'].each do |gen, title|
+      raw = `#{RAILS_ROOT}/script/generate #{gen} --help`
+      out = &quot;Generators -- #{title.gsub('_', '\_')}\n{: .document-title}\n\n&quot; +
+        raw.gsub(/^(\w(\w|\s)*):(.*)/) {|s| &quot;\n## #{$1}\n\n    #{$3}\n&quot;}.
+        gsub(&quot;/work/hobocookbook&quot;, &quot;.&quot;)
+      open(&quot;#{RAILS_ROOT}/manual/generators/#{gen}.markdown&quot;, &quot;w&quot;) do |f|
+        f.write(out)
+      end
+    end
+  end
+
   desc &quot;git pull all plugins/submodules (except for non-Hobo project)&quot;
   task :pull_all =&gt; :environment do
     ['vendor/plugins/paperclip_with_hobo', 'vendor/plugins/hobo', 'public/patches/agility', 'taglibs/hoboyui', 'taglibs/hobo-contrib', 'taglibs/hobo-jquery'].each {|sub|
@@ -24,7 +37,7 @@ namespace :cookbook do
   end
 
   desc &quot;do all update tasks&quot;
-  task :update =&gt; [:environment, :pull_all, :load_api_docs, :rebuild_agility] do
+  task :update =&gt; [:environment, :pull_all, :load_api_docs, :rebuild_agility, :rebuild_generator_docs] do
     true
   end
 end</diff>
      <filename>lib/tasks/cookbook.rake</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>app/views/manual/manual_subsection.dryml</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>509492b8aaa0dba487c065899d3fda5684f89bf1</id>
    </parent>
  </parents>
  <author>
    <name>Bryan Larsen</name>
    <email>bryan@larsen.st</email>
  </author>
  <url>http://github.com/tablatom/hobocookbook/commit/a629151635dda01667540eba93a8b4ecb5ca9df2</url>
  <id>a629151635dda01667540eba93a8b4ecb5ca9df2</id>
  <committed-date>2009-10-23T13:18:15-07:00</committed-date>
  <authored-date>2009-10-23T13:18:15-07:00</authored-date>
  <message>create a Generators section in the manual.</message>
  <tree>f9338f5b9af07af3b0f0a03edb3766de25766492</tree>
  <committer>
    <name>Bryan Larsen</name>
    <email>bryan@larsen.st</email>
  </committer>
</commit>
