Changeset 767
- Timestamp:
- 10/25/07 03:47:53 (1 year ago)
- Files:
-
- trunk/doc/site/src/contribute.page (added)
- trunk/doc/site/src/cookbooks (deleted)
- trunk/doc/site/src/default.css (deleted)
- trunk/doc/site/src/default.template (modified) (1 diff)
- trunk/doc/site/src/docs (added)
- trunk/doc/site/src/docs/index.page (added)
- trunk/doc/site/src/docs/plugins.page (moved) (moved from trunk/doc/site/src/plugins.page) (1 diff)
- trunk/doc/site/src/docs/routing.page (copied) (copied from trunk/doc/site/src/cookbooks/routing.page) (2 diffs)
- trunk/doc/site/src/get.page (added)
- trunk/doc/site/src/images (added)
- trunk/doc/site/src/images/home_bkg.gif (added)
- trunk/doc/site/src/images/icon_lightweight.gif (added)
- trunk/doc/site/src/images/icon_powerful.gif (added)
- trunk/doc/site/src/images/icon_speed.gif (added)
- trunk/doc/site/src/images/line_bkg.gif (added)
- trunk/doc/site/src/images/logo.gif (added)
- trunk/doc/site/src/images/splash_bkg.gif (added)
- trunk/doc/site/src/images/splash_icons.gif (added)
- trunk/doc/site/src/images/tab_bkg.gif (added)
- trunk/doc/site/src/index.page (modified) (1 diff)
- trunk/doc/site/src/stylesheets (added)
- trunk/doc/site/src/stylesheets/coderay.css (added)
- trunk/doc/site/src/stylesheets/common.css (added)
- trunk/doc/site/src/why.page (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/doc/site/src/default.template
r601 r767 1 1 --- content, html 2 2 <?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"> 5 7 <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"> 13 10 </head> 14 11 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>© 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> 51 33 </div> 52 34 </body> trunk/doc/site/src/docs/plugins.page
r671 r767 1 1 --- 2 title: Merb Plugins 3 inMenu: true 4 directoryName: Merb 2 title: Plugins 3 section_id: docs 5 4 --- 5 6 6 h2. How To Install Plugins 7 7 8 8 9 Most Merb plugins are distributed as gems. So, the first step is to install 10 the gem. 9 Most 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 15 If 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> 11 20 12 21 13 Most of the time, you can do: 14 sudo gem install merb_foo 22 If 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' 15 23 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 30 Whether you install it into the system repository or the Merb app's local one, you still need to tell Merb about the plugin. 31 32 Edit config/dependencies.rb and add a call to dependency() somewhere there in the middle: 16 33 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> 35 dependency "merb_foo" 36 </pre></code> 35 37 36 38 You 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> 41 dependency "merb_foo", "> 1.2" 42 dependency "merb_foo", "= 1.2.1" 43 </pre></code> 39 44 40 45 There are other examples of using dependency in your dependencies.rb 41 46 42 43 47 h3. 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 49 If 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. 49 50 50 51 h2. How To Write Merb Plugins 51 Start with52 merb --generate-plugin merb_my_plugin53 52 54 and poke around. 53 Start by typing this into your console: 55 54 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> 58 58 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] 59 and have a poke around. 60 61 Merb 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> 64 Merb::Plugins.config[:merb_my_plugin] 65 </pre></code> trunk/doc/site/src/docs/routing.page
r601 r767 1 1 --- 2 title: Routing Cookbook 3 inMenu: true 4 directoryName: Merb 2 title: Routing 3 section_id: docs 5 4 --- 6 Examples of the Merb router7 5 6 h2. Examples of the Merb router 7 8 <pre><code> 8 9 # A simple route match, sends "/contact" to Info#contact 9 10 # (i.e. the 'contact' method inside the 'Info' controller) … … 81 82 {:controller => "deferred", :action => path_match[1]} 82 83 end 84 </pre></code> trunk/doc/site/src/index.page
r606 r767 1 1 --- 2 title: Merb 2 title: Looking for a better web framework? 3 section_id: home 3 4 inMenu: true 4 5 orderInfo: 0 5 directoryName: Merb6 6 --- 7 h2. Merb8 7 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> 10 13 11 <a href="/rdoc/">rdocs</a> 14 <div id="main"> 15 16 h2. Faster, lighter, more agile 17 18 Lorem 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 20 h2. Install the gem 21 22 <pre><code> 23 $ sudo gem install merb --include-dependencies 24 </code></pre> 25 26 h2. 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 38 h2. Get involved 39 40 We'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 42 h2. Download Merb 43 44 The 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 46 You can find instructions on the "Get Merb page.":/get 47 48 </div>
