Nick Sieger: RubyConf: John Long: Radiant CMS http://blog.nicksieger.com/articles/2006/10/21/rubyconf-john-long-radiant-cms en-us 40 RubyConf: John Long: Radiant CMS <h2>What is Radiant?</h2> <ul> <li>No&#45;fluff, lightweight CMS for small teams</li> <li>Simplicity over features</li> <li>A little more than a blogging engine</li> <li>Made for designers and programmers (techies)</li> <li>Tag&#45;based template language</li> <li>Total control over output</li> <li>Plugin extension mechanism under development</li> <li>Content sites, not portal software</li> </ul> <h2>Getting Started</h2> <ul> <li>Install: <code>gem install radiant</code></li> <li>Generate a new application: <code>mkdir demo &amp;&amp; cd demo &amp;&amp; radiant .</code></li> <li>Configure database: <code>cp config/database.sqlite.yml config/database.yml</code></li> </ul> <h2>Installation types</h2> <ul> <li>Instance mode vs&#46; application mode (whether or not you have Rails source present)&#46; Instance mode also makes it possible to clone and share customize Radiant applications&#46;</li> <li>Base application includes an admin interface</li> </ul> <h2>Pages, Snippets and Layouts</h2> <ul> <li>Hierarchical page management</li> <li>Create page in several states (draft, reviewed, published) in Textile or Markdown with slug, breadcrumb, and layout</li> <li>Snippets are small chunks of content that can be shared between pages (to DRY up your content)</li> <li>Layouts that can be broken down into components of the layout (sidebar, etc&#46;)</li> </ul> <h2>Tags</h2> <ul> <li><a href="http://radius.rubyforge.org/">Radius</a></li> <li><code>&lt;r:title/&gt;</code>, <code>&lt;r:content part="sidebar" inherit="true"/&gt;</code>, <code>&lt;r:snippet name="footer"/&gt;</code>, <code>&lt;r:if_content part="extended"&gt;...&lt;/r:if_content&gt;</code>, <code>&lt;r:children:each limit="5" order="desc"&gt;...&lt;/r:children:each&gt;</code></li> <li>Tags can be embedded anywhere, not just in the layout</li> <li>Tags are contextual &#45;&#45; e&#46;g&#46;, <code>&lt;r:title/&gt;</code> picks the correct title even if it is embedded within a snippet within multiple pages</li> <li>Custom tags possible with &#8220;behavior&#8221;</li> </ul> <h2>Text Filters</h2> <ul> <li>Textile (RedCloth), Markdown (BlueCloth), SmartyPants</li> <li>Vanilla HTML (no filtering)</li> <li>Custom filters possible&#46; [This is my own example below, not John&#8217;s&#46;] <div class="typocode"><pre><code class="typocode_ruby "> <span class="keyword">class </span><span class="class">MyFilter</span> <span class="punct">&lt;</span> <span class="constant">TextFilter</span><span class="punct">::</span><span class="constant">Base</span> <span class="ident">register</span> <span class="punct">'</span><span class="string">profanity filter</span><span class="punct">'</span> <span class="keyword">def </span><span class="method">filter</span><span class="punct">(</span><span class="ident">txt</span><span class="punct">)</span> <span class="ident">txt</span><span class="punct">.</span><span class="ident">gsub</span><span class="punct">(/</span><span class="regex">(damn|ass|shit)</span><span class="punct">/</span><span class="ident">i</span><span class="punct">,</span> <span class="punct">'</span><span class="string">####</span><span class="punct">')</span> <span class="keyword">end</span> <span class="keyword">end</span> </code></pre></div></li> </ul> <p>Radiant is powering the new <a href="http://www.ruby-lang.org/">ruby&#45;lang&#46;org</a> site&#46; Overall, a slick, well&#45;thought out, polished, extendable CMS done very much in the philosophy of Ruby and Rails&#46; Check it out!</p> Sat, 21 Oct 2006 02:54:00 +0000 urn:uuid:c4baea74-8073-49c0-be1e-97919ce5fb65 Nick Sieger http://blog.nicksieger.com/articles/2006/10/21/rubyconf-john-long-radiant-cms ruby rails rubyconf rubyconf2006 http://blog.nicksieger.com/articles/trackback/82