Hello Daniel

On 8 Nov 2005, at 16:29, Daniel Lewis wrote:
> Is there a way to add additional html files onto the Soks servlet?
>
> At the moment I have my Soks-Wiki, which is happily getting and
> setting content... But I want to put a folder with html files into the
> wiki folder. A structure a bit like this:

<snip>

> Now ideally I'd like to have a link from the side bar to the
> "htmlAdditions" folder, and this all being done on the same soks
> server.
>
> Anyone have any ideas? Anyone know anyone that would be able to help?

Assuming you are using a reasonably recent version of Soks:

Open your start.rb file

Look for a line like this:
servlet.static_file_directories[ 'Attachment' ] = "#{root_directory}/ 
attachment"

And add another line like this just after it:
servlet.static_file_directories[ 'Htmladditions' ] = "# 
{root_directory}/htmlAdditions"

You should now be able to browse the static file directory by going to:

http://whereveryourwikiis/Htmladditions/randomHtmlFile.html

You can put a link to the directory by typing this on your sidebar page:
"Pretty name":/Htmladditions/randomHtmlFile.html

Note, in my testing that this works just now I've discovered two bugs:
1) With servlet.static_file_directories[ 'Htmladditions' ]  the  
'Htmladditions' MUST start with a capital letter, and the remainder  
must be lowercase (e.g. htmlAdditions would not work)
2) http://whereveryourwikiis/Htmladditions or http:// 
whereveryourwikiis/Htmladditions/ will not work.  You must specify a  
filename such as http://whereveryourwikiis/Htmladditions/index.html

I'll fix these for the next release.  Let me know if you have any  
other bugs or questions.

Tom