Rextile Sample

This is a minimalistic sample of what a plain, unstyled site constructed with Rextile using the default template looks like.

Table of Contents

Rextile has a simple command for constructing a TOC from the headings within a page: <%= toc %>:

Note how

Header and Footer

Breadcrumbs in Header

Rextile automatically builds a so-called breadcrumbs navigation atop pages. You can see this in action here. You can turn this off or customize it.

Modification Date in Footer

Rextile automatically adds a footer with the file’s modification date. You can turn this off or customize it. Note that this reflects the modification date of the source file, not the generated XHTML file.

Scripts (anchor is “scripts”)

We can do plain Ruby in scripts:

This page was last modified on <%= File.new( rextile_name ).mtime.getlocal.strftime( '%b %d, %Y' ) %>.

This page was last modified on Nov 18, 2012.

A more sophisticated example is how to build an automatic page-index, as shown here.

Textile Features

Textile is about the simple use of common HTML elements. I am giving just a few examples here. There’s more over at the Textile site.

Bulleted List

Spaced Bulleted List

Code Blocks

A small code block:

Here is the code,
on two lines.
Another code block.

The above example puts the two blocks into separate pre tags. If you don’t want that, use pre explicitly:

A code block with empty lines.

Here we go.

As is normal with HTML, we have to put the first line right behind the > of the code tag to avoid a spurious blank line. What a nuisance.