In this section we'll take a look at G-Cows' web site, just to get the taste of what you can do with this tool. Please notice that site located at http://www.g-cows.org/ could have changed after the release of this manual.
The first thing you'll notice is that two versions of the site are present; if you quickly browse each of them you'll find out they have a completely different layout but share the same contents and navigation scheme. This is trivial with G-Cows: I separated contents and layout and used conditional expressions within the few files describing layout. So, when I add or modify a page, I only need to deal with a single version and G-Cows updates both.
As you can see, contents are divided in sections:
About
Examples
Download
Documentation
About this Site
Resources
Animal Rights
Quotations
Most sections are themselves divided in subsections; as an example About' is divided in:
Introducing Cows
What is G-Cows
Features
License
Future Development
Each page displays an index of sections; selecting a section you'll get an index of its subsections. Cows allows to include these indexes from common files in order to make it very easy to update the site. But that's not the whole story since indexes slightly differs from page to page; in fact link referring to the current page is disabled and highlighted. Cows' conditional expressions allow this with a few lines of code.
This site is not very large but I like keeping files in different directories to facilitate upgrading; this can be a problem when a file containing links is included from files stored in different directories. As an example, page http://www.g-cows.org/main/index.html links `About G-Cows' menu item to ../main/about/about.html while page http://www.g-cows.org/main/docs/docs.html links the same item to ../../main/about/about.html. However, these menus are still generated from a single file, thanks to a link correction function provided by Cows.
Another useful feature is the date of last modify displayed on section indexes: I use G-Cows to keep track of these dates in order to reduce chances of an error and avoid useless work. Similar considerations hold for the `Documentation' section: file sizes are automatically inserted by G-Cows so, whenever I modify a file, a single command will update the whole site.
Finally, notice that every page displays a link to the other version of the site; if you follow the link you'll get the alternate version of the current page. When I first created this site these links simply pointed to the main page of the alternate version but users had to search their page again. Adding this new feature only requested a single line of code in a single source file.
Suppose I modify the Postscript version of this manual: I only need to type one command in order to upgrade the whole site. The page describing the manual will show the new size of the document and the introductory page of section `Documentation' will in turn reflect the changes indicating the new date of last revision for this page. Also the site map will be updated. Of course this will happen for both version of the site. Think about the chances to forget to upgrade one of these files with a manual procedure.
This manual can be downloaded from http://www.g-cows.org/.