0
@@ -6,48 +6,25 @@ filter:
0
-<notextile><script type="text/javascript">
0
- $('div.toc').corner("br tl round 22px");
0
<div class="toc push-1">
0
-h4(#toc). Table of Contents
0
-# "Getting Started":#gettingstarted
0
-## "Installation":#installation
0
-## "New Website":#newwebsite
0
-# "Working With Resources":#workingwithresources
0
-### "Page Attributes":#pageattributes
0
-### "Page Filters":#pagefilters
0
-## "Markdown":#markdown
0
-## "HAML & SASS":#hamlsass
0
-## "Graphviz":#graphviz
0
-## "BasePath":#basepath
0
-# "Using Rake":#usingrake
0
+p(title). Table of Contents
0
-h2
(#gettingstarted){clear:none}. Getting Started
0
+h2
{clear:none}. Getting Started
0
-h3
(#requirements){clear:none}. Requirements
0
+h3
{clear:none}. Requirements
0
Webby is an application written using the Ruby programming language. To install and run Webby you will need the following applications on your system:
0
* "Ruby":http://ruby-lang.org
0
* "RubyGems":http://rubygems.org/read/chapter/3
0
-h3
(#installation){clear:none}. Installation
0
+h3
{clear:none}. Installation
0
Webby is an application written using the Ruby programming language. You will need to install a Ruby interpreter on your computer. Download and installation instructions can be found on the "Ruby":http://ruby-lang.org website. For the Windows platform, the one-click installer is recommended. Webby is not compatible with the Ruby 1.9.0 release; please use the Ruby 1.8.6 release.
0
@@ -68,9 +45,9 @@ sudo gem install -y haml
0
sudo gem install -y coderay
0
-h3
(#newwebsite). New Website
0
-h2
(#workingwithresources). %(num)2% Working With Resources
0
+h2
. Working With Resources
0
A resource is any file that is found in the _content_ or _layouts_ folders. Resources are either copied to the output folder or they are processed through the Webby filter engine to generate an output file. Resources fall into one of three types:
0
@@ -82,7 +59,7 @@ Files are the simplest resource to handle. They are copied, unchanged, from the
0
Files will only be found in the _content_ folder. The _layouts_ folder is reserved solely for layouts.
0
-h3(#pages).
%(num)2.1% Pages
0
Pages are found in the _content_ folder along with regular files. Pages contain *meta-data* at the top of the file; this is what differentiates a page from a regular file. The meta-data is a section of "YAML":http://www.yaml.org/spec/1.1/ formatted text that describes various properties and attributes of the page. These attributes are used by Webby to determine how the page will be processed by the filter engine.
0
@@ -119,7 +96,7 @@ You can see that the value of the @title@ attribute was substituted for the ERB
0
The last attribute in the meta-data section is the @filter@ attribute. The value for this attribute is a list of filters that will be applied to the page contents. The filters will be applied in the order they are specified. For the example page this would be the ERB filter followed by the Textile filter.
0
-h4
(#pageattributes). %(num)2.1.1% Page Attributes
0
Attribute identifiers cannot contain spaces; they must be separated from their values by a colon. Other than that, you are free to define as many attributes as you like. Aside from defining values that can be rendered into a page, attributes are also used to find other pages in the site. Finding and linking to other pages is discussed in the "ERB Filter":#erbfilter section.
0
@@ -145,11 +122,11 @@ The following attributes are defined for each page in the content folder. These
0
* *url* -- A URL suitable for creating a link to the page
0
* *render* -- Returns the contents of the page as rendered by the Webby filter engine
0
-h4
(#pagefilters). %(num)2.1.2% Page Filters
0
Filters operate on the content of a page by transforming the text of the content section according to the rules of the individual filter. Some filters transform simplified markup into true HTML syntax; examples of these are the Textile filter and the Markdown filter. Other filters create images from text in the page (Graphviz filter) or apply syntax highlighting to the text (CodeRay filter). All the filters are discussed in detail in the "Filters":#filters section of this document.
0
-h3
(#layouts). %(num)2.2% Layouts
0
Layouts provide the basic framework for a page -- the header, the footer, the navigation. They provide a consistent look and feel across all pages in the website. Individual pages contain just the content for that particular page.
0
@@ -187,13 +164,13 @@ The example above shows a very simple layout. The content for the current page b
0
Along with the @@content@ variable, all the attributes of the current page being rendered are also accessible in the layout. The page title is inserted into the HTML title tags. But again, any page attribute can be accessed within the layout via the @@page@ variable.
0
-h2(#filters).
%(num)3% Filters
0
Filters are used in Webby to transform the text of pages and layouts. The filters applied to a page are defined in the meta-data of the page. The filters are used to transform different parts of the page contents resulting in HTML syntax, images, highlighted code, etc. Filters apply equally to pages and to layouts -- that is, pages and layouts are treated in the same manner by filters.
0
This section will look at the various filters provided by Webby, what those filters do, and how they should be used. Enjoy!
0
-h3(#erbfilter).
%(num)3.1% ERB
0
"ERB":http://ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html provides an easy to use but powerful templating system for Ruby. Using ERB, Ruby code can be added to any plain text document for the purposes of generating document information details and/or flow control. Much of the functionality Webby has to offer is made available through the erb filter. ERB does not place any limitations on the content of the page, so it is recommended to use the erb filter with another filter that simplifies the HTML markup -- Textile is my favorite, but Markdown and HAML support are provided in Webby, as well. Chose the markup language that suits your style.
0
@@ -219,7 +196,7 @@ p(column span-2). *Require*:
0
p(column span-13). none
0
-h3
(#textile). %(num)3.2% Textile
0
"Textile":http://en.wikipedia.org/wiki/Textile_%28markup_language%29 is a lightweight markup language originally developed by Dean Allen and billed as a "humane Web text generator". The textile filter converts Textile formatted text into valid, well-formed XHTML.
0
@@ -241,7 +218,7 @@ p(column span-13). The @RedCloth@ gem must be installed on your system in order
0
fn1(fn){clear:both}. Please don't ask. Why is very smart, he wrote the Ruby code that handles Textile markup, and the code is very solid. Enjoy the benefits of his work.
0
-h3
(#markdown). %(num)3.3% Markdown
0
"Markdown":http://daringfireball.net/projects/markdown/ is a lightweight markup language created by John Gruber. It allows you to write using an easy-to-read, easy-to-write plain text format. From the Markdown web page:
0
@@ -261,7 +238,7 @@ p(column span-2). *Require*:
0
p(column span-13). The @BlueCloth@ gem must be installed on your system in order to use the markdown filter.
0
-h3
(#hamlsass). %(num)3.4% HAML & SASS
0
"HAML":http://haml.hamptoncatlin.com/ is a markup language created by Hampton Catlin that's used to cleanly and simply describe the XHTML of any web document without the use of inline code. SASS is the equivalent for CSS documents. From the HAML website:
0
@@ -283,7 +260,7 @@ p(column span-2). *Require*:
0
p(column span-13). The @haml@ gem must be installed on your system in order to use the haml filter or the sass filter.
0
-h3
(#coderay). %(num)3.5% CodeRay
0
"CodeRay":http://coderay.rubychan.de/ is a Ruby library that provides syntax highlighting for various types of source code. The coderay filter takes a portion of the page contents and runs it through the CodeRay syntax highlighter, and pretty, colored XHTML is inserted into the page. The end result is that you can embed code into a page, and the coderay filter will convert that code into valid XHTML.
0
@@ -323,7 +300,7 @@ p(column span-2). *Require*:
0
p(column span-13). The @coderay@ gem must be installed on your system in order to use the coderay filter. Be sure to include the coderay stylesheet in your layout.
0
-h3
(#graphviz). %(num)3.6% Graphviz
0
"Graphviz":http://www.graphviz.org/ is open source graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. The Graphviz layout programs take descriptions of graphs in a simple text language, and make diagrams in several useful formats. The graphviz filter allows you to embed Graphviz scripts into a page and generate an image in the page.
0
@@ -359,7 +336,7 @@ p(column span-2). *Require*:
0
p(column span-13). The Graphviz application must be installed on your system, and the Graphviz executables must be available on the path.
0
-h3
(#basepath). %(num)3.7% BasePath
0
The basepath filter is used to rewrite the base path location for all URLs in a page. This is useful for the times when the publish location of the website is no at the root of the web server -- @http://your.website.com/path/to/your/site@ for example. This allows pages and resources (images, javascript, stylesheets, etc.) to be referenced from the root of the Webby web server for easy development, but the paths of these resources can easily be changed by the basepath filter when the website is being deployed.
0
@@ -386,7 +363,7 @@ p(column span-2). *Require*:
0
p(column span-13). none
0
-h3
(#tidy). %(num)3.8% Tidy
0
"Tidy":http://www.w3.org/People/Raggett/tidy/ is a useful application for cleaning up and detecting errors in XHTML text. The tidy filter will run your XHTML code through the tidy program and report any errors in the build log. From the HTML Tidy website:
0
@@ -410,5 +387,5 @@ p(column span-2). *Require*:
0
p(column span-13). The HTML Tidy application must be installed on your system, and the @tidy@ executable must be available on the path.
0
-h2
(#usingrake). Using Rake
Comments
No one has commented yet.