forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ferdinand Soethe <>
Subject Inkonsistency in implementation of default file and site.xml and what to do about it
Date Tue, 03 May 2005 03:21:10 GMT

Sorry, this needs to be long (and dirty)

in a freshly seeded site change site.xml to

<site label="Demo Site" xmlns="" tab="">
  <menu1 label="Menu 1">
    <page1 label="Page 1" href="page1.html"/> 
    <page2 label="Page 2" href="page2.html"/> 

Place these files in the xdocs dir


Now do a forrest.
In build site you will get the following files which is perfect
because the first file in site will become the start page of our
statically rendered site.


Now do a forrest run

Unfortunately that is where the trouble begins.
Calling just localhost:8888 Forrest will load index.html or - if you
remove it - give you an ugly error message.

Same site two different results. Shouldn't be, should it?

Now looking at ways to fix this I'll consider Ross's suggestions one
by one:

> From cli.xconf:
>     <!--+
>         |  Specifies the filename to be appended to URIs that
>         |  refer to a directory (i.e. end with a forward slash).
>         +-->
>     <default-filename>index.html</default-filename>

This changes the default-name for all directory-only URIs, so changing
it to page1.html will technically solve our problem. But then who
wants to change that for all the pages just to be able to have a
non-standard start-up page. And what about the confusion when the
buyer of a CD-documentation will find a start-me.html in every

> Also from sitemap.xmap:
>        <map:match pattern="">
>          <map:redirect-to uri="index.html" />
>        </map:match>
>        <map:match type="regexp" pattern="^.+/$">
>            <map:redirect-to uri="index.html"/>
>        </map:match>

This is more promising since pattern="" will only apply to
http://myserver and not to http://myserver/mydir (I think).

Problem is the second pattern for stepping back up directories by
entering a '..'-URI. It would have to be replaced by two different
patterns for first level subdirs (use same setting as pattern="") and
other levels (keep index.html).

(My) Conclusion:

None of this is nice or easy to do or explain. So until somebody
writes a patch that will derive the name of the first project page
from the first file url in site.xml (or an attribute 'startpage' in
the site-element), I suggest to pretend that it is rigid and keep the
note in site.xml as it is.

Ferdinand Soethe

View raw message