# Webby 0.8.0

**URL:** <https://www.ruby-forum.com/t/webby-0-8-0/130544>\
**Category:** Ruby\
**Created:** [February 29, 2008, 6:13am UTC](https://www.ruby-forum.com/t/webby-0-8-0/130544 "2008-02-29T06:13:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 29, 2008, 6:13am UTC](https://www.ruby-forum.com/t/webby-0-8-0/130544/1 "2008-02-29T06:13:46Z")

</div>

Webby version 0.8.0 (Apocalypse Cow)  
by Tim P.  
[http://webby.rubyforge.org/](http://webby.rubyforge.org/)  
(the “Apocalypse Cow” release)

== DESCRIPTION

Webby is a super fantastic little website management system. It would be  
called a _content management system_ if it were a bigger kid. But, it’s  
just a runt with a special knack for transforming text. And that’s  
really  
all it does - manages the legwork of turning text into something else,  
an  
_ASCII Alchemist_ if you will.

== IMPORTANT CHANGES

The Graphviz and CodeRay filters have been removed, and the  
functionality those filters provide have been converted into Ruby  
methods available via ERB. This will require a code change for any  
page that uses one of those filters.

 def some\_method() nil end 

Will need to change to:

\<% coderay(:lang =\> ‘ruby’) do %\>  
def some\_method()  
nil  
end  
\<% end %\>

Similar changes will need to be made for graphviz blocks (which, I  
assume, are much less used by the general public). The reason for this  
change, simply put, is speed. Providing CodeRay and Graphviz  
functionality  
via ERB methods reduces the number of times the page must be parsed.

Here is a snippet of Ruby code that will transform a file:  
[http://pastie.caboo.se/153245](http://pastie.caboo.se/153245)

== CHANGES

- 3 major enhancements
  - Added support for partials
  - Refactored the coderay and graphviz filters into helper methods  
accessible from ERB
  - Added support for embedding LaTeX mathematical equations

- 3 minor enhancements
  - Added a template file for creating Atom feeds
  - The SITE configuration is available in pages and layouts as  
the @config variable
  - Can specify the port the Heel webserver starts on using the  
SITE.heel\_port option in the Rakefile

- 2 bug fixes
  - When creating pages in directory mode the full page path was  
not being created
  - Read only files were being created in the output folder  
preventing them from being overwritten if changed

You’ll need to update the rake tasks for any Webby sites you have  
created:

webby -u site\_directory

== FUN FACT

Walt Disney was afraid of mice.

== POST SCRIPT

Blessings,  
TwP

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [February 29, 2008, 6:28am UTC](https://www.ruby-forum.com/t/webby-0-8-0/130544/2 "2008-02-29T06:28:24Z")

</div>

There’s a broken link at the bottom of the main  
[http://webby.rubyforge.org](http://webby.rubyforge.org) page:

[http://webby.rubyforge.org/tutorial.html](http://webby.rubyforge.org/tutorial.html)

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 1, 2008, 8:10am UTC](https://www.ruby-forum.com/t/webby-0-8-0/130544/3 "2008-03-01T08:10:55Z")

</div>

removed\_email\_address@domain.invalid wrote:

> all it does - manages the legwork of turning text into something else, an  
> _ASCII Alchemist_ if you will.

Very slick.

Quick question (could not find an answer on the project site): How do I  
configure a site to write the generated site to a directory other than  
‘output’?

–  
James B.

[http://web2.0validator.com](http://web2.0validator.com) - We’re the Dot in Web 2.0  
[http://www.rubyaz.org](http://www.rubyaz.org) - Hacking in the Desert  
[http://www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 1, 2008, 5:20pm UTC](https://www.ruby-forum.com/t/webby-0-8-0/130544/4 "2008-03-01T17:20:19Z")

</div>

On Mar 1, 2008, at 12:10 AM, James B. wrote:

> > just a runt with a special knack for transforming text. And that’s  
> > other than ‘output’?

Add the following line to the project Rakefile

SITE.output\_dir = ‘your/new/output/directory’

The SITE constant is an OpenStruct that holds all the defaults for the  
website. Here are all the default settings (just FYI) – you can find  
them in the lib/webby.rb file in the gem

```
 @site = OpenStruct.new(
   :output_dir => 'output',
   :content_dir => 'content',
   :layout_dir => 'layouts',
   :template_dir => 'templates',
   :exclude => %w(tmp$ bak$ ~$ CVS \.svn),
   :page_defaults => {
     'layout' => 'default'
   },
   :find_by => 'title',
   :base => nil,
   :create_mode => 'page',

   # Items for running the heel webserver
   :heel_port => 4331,

   # Items used to deploy the webiste
   :host => 'removed_email_address@domain.invalid',
   :remote_dir => '/not/a/valid/dir',
   :rsync_args => %w(-av --delete),

   # Options passed to the 'tidy' program when the tidy filter is

```

used  
:tidy\_options =\> ‘-indent -wrap 80’,

```
   # XPath identifiers used by the basepath filter
   :xpaths => %w(
       /html/head//base[@href]
       /html/head//link[@href]
       //script[@src]
       /html/body[@background]
       /html/body//a[@href]
       /html/body//object[@data]
       /html/body//img[@src]
       /html/body//area[@href]
       /html/body//form[@action]
       /html/body//input[@src]
   )
   # other possible XPaths to include for base path substitution
   # /html/body//object[@usemap]
   # /html/body//img[@usemap]
   # /html/body//input[@usemap]
 )

```

Blessings,  
TwP

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 1, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/webby-0-8-0/130544/5 "2008-03-01T20:05:24Z")

</div>

Tim P. wrote:

> On Mar 1, 2008, at 12:10 AM, James B. wrote:

> > Quick question (could not find an answer on the project site): How do  
> > I configure a site to write the generated site to a directory other  
> > than ‘output’?
> 
> Add the following line to the project Rakefile
> 
> SITE.output\_dir = ‘your/new/output/directory’

Great. Thank you very much. Really good work.

–  
James B.

“Programs must be written for people to read, and only incidentally  
for machines to execute.”

- H. Abelson and G. Sussman  
(in "The Structure and Interpretation of Computer Programs)
