[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [ANN] webby 0.8.0

James Britt

3/1/2008 7:10:00 AM

tim.pease@gmail.com wrote:
> Webby version 0.8.0 (Apocalypse Cow)
> by Tim Pease
> http://webby.ruby...
> (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.


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 Britt

http://web2.0val... - We're the Dot in Web 2.0
http://www.... - Hacking in the Desert
http://www.jame... - Playing with Better Toys

2 Answers

Tim Pease

3/1/2008 4:18:00 PM

0

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

> tim.pease@gmail.com wrote:
>> Webby version 0.8.0 (Apocalypse Cow)
>> by Tim Pease
>> http://webby.ruby...
>> (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.
>
>
> 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'?
>

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 => 'user@hostname.tld',
: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

James Britt

3/1/2008 7:05:00 PM

0

Tim Pease wrote:
> On Mar 1, 2008, at 12:10 AM, James Britt 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 Britt

"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)