Changeset 767

Show
Ignore:
Timestamp:
10/25/07 03:47:53 (1 year ago)
Author:
luke.sutt..@gmail.com
Message:

A big rejig of the Merb site, to be generated with wegen. We have a working template and stubs for each page.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/doc/site/src/default.template

    r601 r767  
    11--- content, html 
    22<?xml version="1.0" encoding="UTF-8"?> 
    3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
    4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang:}"> 
     3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
     4  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
     5 
     6<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 
    57  <head> 
    6     <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
    7     <meta name="description" content="Your website description goes here" /> 
    8     <meta name="keywords" content="your,keywords,goes,here" /> 
    9     <meta name="generator" content="webgen - http://webgen.rubyforge.org" /> 
    10     <link rel="stylesheet" href="{relocatable: default.css}" type="text/css" media="screen,projection" /> 
    11     <link rel="stylesheet" type="text/css" href="{resource: webgen-css}" /> 
    12     <title>{title:}</title> 
     8    <title>Merb - {title:}</title> 
     9    <link rel="stylesheet" href="{relocatable: /stylesheets/common.css}" type="text/css" media="screen" charset="utf-8"> 
    1310  </head> 
    1411 
    15   <body> 
    16     <div id="container" > 
    17  
    18       <div id="header"> 
    19         <h1><a href="{relocatable: /index.page}">Merb</a></h1> 
    20         <h2>it's fast</h2> 
    21       </div> 
    22  
    23       <div id="navigation"> 
    24         {menu: {menuStyle: vertical, options: {maxLevels: 1}}} 
    25       </div> 
    26  
    27       <div id="content"> 
    28         {block:} 
    29       </div> 
    30  
    31       <div id="subcontent"> 
    32         <div class="small box"><strong>Note: </strong>This is a box. It can be used for special messages both in the sidebar and the content section. You could use it for special notes and announcements, but also as a frame for photos. This space can be used for a short website presentation!</div> 
    33  
    34         <h2>Nested Menu</h2> 
    35         {menu: vertical} 
    36  
    37         <h2>Links</h2> 
    38         <ul class="linkblock"> 
    39           <li><a href="http://webgen.rubyforge.org">webgen</a></li> 
    40           <li><a href="http://andreasviklund.com/templates">Website templates</a></li> 
    41           <li><a href="http://openwebdesign.org">Open Web Design</a></li> 
    42           <li><a href="http://oswd.org">OSWD.org</a></li> 
    43         </ul> 
    44  
    45       </div> 
    46  
    47       <div id="footer"> 
    48         <p>&copy; 2006 <a href="#">Your Name</a> | Generated by <a href="http://webgen.rubyforge.org">webgen</a> | Design by <a href="http://andreasviklund.com">Andreas Viklund</a></p> 
    49       </div> 
    50  
     12  <body id="{section_id:}"> 
     13    <div id="header"> 
     14      <h1>Merb</h1> 
     15      <ul> 
     16        <li id="homeNav"><a href="/">Home</a></li> 
     17        <li id="whyNav"><a href="/why">Why Merb?</a></li> 
     18        <li id="docsNav"><a href="/docs">Documentation</a></li> 
     19        <li id="ticketsNav"><a href="http://merb.devjavu.com/tickets">Tickets</a></li> 
     20        <li id="contributeNav"><a href="/contribute">Contribute</a></li> 
     21        <li id="getNav"><a href="/get">Get Merb</a></li> 
     22      </ul> 
     23    </div> 
     24     
     25    <div id="content"> 
     26      <h1>{title:}</h1> 
     27      {block:} 
     28    </div> 
     29     
     30    <div id="footer"> 
     31      <h1>Copyright 2006 Ezra Zygmuntowicz</h1> 
     32      <p>Merb is releleased under an <a href="http://">MIT License</a></p> 
    5133    </div> 
    5234  </body> 
  • trunk/doc/site/src/docs/plugins.page

    r671 r767  
    11--- 
    2 title: Merb Plugins 
    3 inMenu: true 
    4 directoryName: Merb 
     2title: Plugins 
     3section_id: docs 
    54--- 
     5 
    66h2. How To Install Plugins 
    77 
    88 
    9 Most Merb plugins are distributed as gems.  So, the first step is to install 
    10 the gem. 
     9Most Merb plugins are distributed as gems, which means they'll be in the RubyForge index usually. So, the first step is to install the gem. Most of the time, you can do: 
     10 
     11<pre><code> 
     12$ sudo gem install merb_foo 
     13</code></pre> 
     14   
     15If the gem is not in any of the remote repositories yet, you can download it and install it directly: 
     16 
     17<pre><code> 
     18$ sudo gem install ./merb_foo-1.2.1.gem 
     19</code></pre> 
    1120 
    1221 
    13 Most of the time, you can do: 
    14   sudo gem install merb_foo 
     22If you don't have (or want to use) sudo access, you can install the gem into your Merb app's local gem repo, which is in a directory named 'gems' 
    1523 
     24<pre><code> 
     25$ cd my_merb_app ; gem install merb_foo -i gems 
     26-or- 
     27$ cd my_merb_app ; gem install ../merb_foo-1.2.1.gem -i gems 
     28</code></pre> 
     29 
     30Whether you install it into the system repository or the Merb app's local one, you still need to tell Merb about the plugin. 
     31 
     32Edit config/dependencies.rb and add a call to dependency() somewhere there in the middle: 
    1633   
    17 If the gem is not in any of the remote repositories yet, you can download it 
    18 and install it directly: 
    19   sudo gem install ./merb_foo-1.2.1.gem 
    20  
    21  
    22 If you don't have (or want to use) sudo access, you can install the gem into 
    23 your Merb app's local gem repo, which is in a directory named 'gems' 
    24   cd my_merb_app ; gem install merb_foo -i gems 
    25   -or- 
    26   cd my_merb_app ; gem install ../merb_foo-1.2.1.gem -i gems 
    27  
    28  
    29 Whether you install it into the system repository or the Merb app's local one, 
    30 you still need to tell Merb about the plugin. 
    31  
    32 Edit config/dependencies.rb and add a call to dependency() somewhere there in 
    33 the middle: 
    34   dependency "merb_foo" 
     34<pre><code> 
     35dependency "merb_foo" 
     36</pre></code> 
    3537   
    3638You can also require a specific version, using Gem version strings: 
    37   dependency "merb_foo", "> 1.2" 
    38   dependency "merb_foo", "= 1.2.1" 
     39 
     40<pre><code> 
     41dependency "merb_foo", "> 1.2" 
     42dependency "merb_foo", "= 1.2.1" 
     43</pre></code> 
    3944 
    4045There are other examples of using dependency in your dependencies.rb 
    4146 
    42  
    4347h3. Old-Style (Rails) Plugins 
    44 If you look at your config/dependencies.rb you'll see that the last few lines 
    45 load all the plugins in gems/plugins.  If you have Rails ActiveRecord plugins 
    46 you want to use, you can try dropping them in there and see what happens. 
    47  
    48  
     48   
     49If you look at your config/dependencies.rb you'll see that the last few lines load all the plugins in gems/plugins.  If you have Rails ActiveRecord plugins you want to use, you can try dropping them in there and see what happens. 
    4950 
    5051h2. How To Write Merb Plugins 
    51 Start with 
    52   merb --generate-plugin merb_my_plugin 
    5352 
    54 and poke around. 
     53Start by typing this into your console: 
    5554 
    56 Merb adds a hook you can call to add things to the app's Rakefile, using 
    57 Merb::Plugins.add_rakefiles. 
     55<pre><code> 
     56$ merb --generate-plugin merb_my_plugin 
     57</pre></code> 
    5858 
    59 Merb gives you a Merb::Plugins.config hash...feel free to put your stuff in  
    60 your piece of it: 
    61   Merb::Plugins.config[:merb_my_plugin] 
     59and have a poke around. 
     60 
     61Merb adds a hook you can call to add things to the app's Rakefile, using Merb::Plugins.add_rakefiles. It also gives you a Merb::Plugins.config hash. It's a good place to keep any options specific to your plugin. 
     62 
     63<pre><code> 
     64Merb::Plugins.config[:merb_my_plugin] 
     65</pre></code> 
  • trunk/doc/site/src/docs/routing.page

    r601 r767  
    11--- 
    2 title: Routing Cookbook 
    3 inMenu: true 
    4 directoryName: Merb 
     2title: Routing 
     3section_id: docs 
    54--- 
    6 Examples of the Merb router 
    75 
     6h2. Examples of the Merb router 
     7 
     8<pre><code> 
    89# A simple route match, sends "/contact" to Info#contact 
    910# (i.e. the 'contact' method inside the 'Info' controller) 
     
    8182  {:controller => "deferred", :action => path_match[1]} 
    8283end 
     84</pre></code> 
  • trunk/doc/site/src/index.page

    r606 r767  
    11--- 
    2 title: Merb 
     2title: Looking for a better web framework? 
     3section_id: home 
    34inMenu: true 
    45orderInfo: 0 
    5 directoryName: Merb 
    66--- 
    7 h2. Merb 
    87 
    9 Welcome to the Merb docs. 
     8<ul id="splash"> 
     9  <li><a id="speed" href="/why/#speed">Build for speed</a></li> 
     10  <li><a id="lightweight" href="/why/#lightweight">Lightweight</a></li> 
     11  <li><a id="powerful" href="/why/#powerful">Powerful</a></li> 
     12</ul> 
    1013 
    11 <a href="/rdoc/">rdocs</a> 
     14<div id="main"> 
     15 
     16h2. Faster, lighter, more agile 
     17 
     18Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi et risus. Aliquam nisl. Nulla facilisi. Cras accumsan   vestibulum ante. Vestibulum sed tortor. Praesent tempus fringilla elit. Ut elit diam, sagittis in, nonummy in, gravida non, nunc. Ut orci. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nam egestas, orci eu imperdiet malesuada, nisl purus fringilla odio, quis commodo est orci vitae justo. Aliquam placerat odio tincidunt nulla. Cras in libero. Aenean rutrum, magna non tristique posuere, erat odio eleifend nisl, non convallis est tortor blandit ligula. Nulla id augue. 
     19 
     20h2. Install the gem 
     21 
     22<pre><code> 
     23$ sudo gem install merb --include-dependencies 
     24</code></pre> 
     25 
     26h2. Generate and run 
     27 
     28<pre><code> 
     29$ merb -g my_application 
     30$ cd my_application 
     31$ merb 
     32</code></pre> 
     33 
     34</div> 
     35 
     36<div id="side"> 
     37 
     38h2. Get involved 
     39 
     40We're always looking for contributions of any kind — code, documentation etc — so if you'd like to help us out, have a look at <a href="/contribute">the Contribute page.</a> 
     41 
     42h2. Download Merb 
     43 
     44The easiest way to get Merb is to install it via RubyGems, but if you want to have the absolute latest — and unstable — version, you can grab it from out Subversion repository. 
     45 
     46You can find instructions on the "Get Merb page.":/get 
     47 
     48</div>