rest2web - The Site Builder
Autogenerating Websites with Docutils
rest2web is a tool for autogenerating wesites, or parts of websites. It's main features are :
The content can be stored as HTML, or in ReST format; in which case the HTML will be generated using docutils. rest2web inserts each page into a template, and automatically creates index pages for sections, and navigation links.
ReST is a WYSIWYG text markup format. It is simpler than HTML - but very flexible. A document marked up with reST is still readable as text. This means that maintaining article contents in reST is a lot easier than maintaining them in HTML.
Adding new pages is as easy as dropping a text file into the right folder. rest2web builds the new page and adds a link to it in the index (optionally with a description as well). Removing a page is just as easy. Delete the file, and when you run rest2web again it removes the entry.
rest2web includes standard functions to build a sidebar, with links to the other pages in the directory, or to the other sections in the website.
Another advantage is that a website can be easily restyled by only changing template files. It is likely that only a few template files will be needed for most websites .
Because rest2web generates sites using relative paths, the results can be viewed from the filesystem. This means that it is an effective way of bundling documentation.
With uservalues you can use rest2web to create versions of a website in different languages. Simply create the framework once with your uservalues as place markers - then create your files with different translations. rest2web will build the website and can handle linking the sites together.
An example of a site that uses this feature is, the Website of Marius Soutier.
rest2web is a dynamic website generation tool - that generates static (HTML) pages. The rationale of creating static content, is that most pages will only change occasionally - serving static HTML content is quicker than generating pages dynamically. Not only that, but static content can be served by a lot cheaper hosting account!
Distributing HTML documentation is another reason for wanting static pages.
rest2web comes about from a need for me to restyle a whole website from badly marked up HTML 4, into beautiful XHTML and CSS. See the Voidspace Manifesto for a discussion of my aims and objectives in the restyle.
An added challenge is that part of the website is already restyled - and the blog pages are built using a different tool (Firedrop2, which also uses ReST incidentally). All this means that rest2web needs to be able to handle generating just part of a website, and indexes for the existing parts where necessary.
rest2web uses a directory structure to represent sites. Each directory can have an index page autobuilt with a link to each page and a brief description.
Each page can (optionally) have a sidebar with links to the other pages in the directory. rest2web will also handle creating breadcrumbs, which are navigation trails to the directories above the one the user is in.
The pages in each directory can be grouped into sections for the index page. The index can have a brief description for each section included automatically.
You can control the order that sections appear on the index, and also the order of pages within each section.
Although rest2web uses a directory structure to represent your site, you aren't forced to keep your contents in this structure. You can put placeholders in the directory pointing to the real location of the file. rest2web will handle making sure that the breadcrumbs, sidebars and index page links all point to the right location.
All links within the site are kept relative. This is especially useful when creating HTML documents that might be viewed from the filesystem.
rest2web is being used to create websites for various Open Source projects and personal websites. Browsing these can give you an idea of the sort of things it's possible to do with rest2web.
The sites I've discovered include :
I also use it to build the docs for :