Only three easy steps!
- Download the source from github and copy all five files (index.php, template.sws, .htaccess, base.tmpl, base.css) to your site directory.
- (Optionally) Enable mod_rewrite. SWS will fallback without it by inserting "/?p=" after your domain name in all of its URLs.
- Fill base.tmpl with your base html structure, base.css with your styles, and template.sws with your content. You can put other static content in an /other directory, where mod_rewrite won't intercept the requests and try to parse them.
If You say: But I can only use static HTML!
It's OK, I forgive you. Just add these three (easy!) steps
- Set a 'filepath' attribute in the <site> tag to where you want the static html files to compile to, and set the 'urlpath' attribute to where the site root will be in your URLs (ie. for a SWS site at the domain root, this is just "/")
- Visit the index page of your site in your sandbox to recompile [all of] your static files
- (Optionally) If your 'filepath' attribute does not point to your production environment, copy all files from your filepath to your corresponding production environment.
A Static Example: My Stanford Web Space
(1) For my Stanford web space my filepath is "WWW" and my urlpath is "/~benzn". (2) I visit my staging environment (at http://stanford.edu/~benzn/cgi-bin/SWS/), and (3) I run:
myth:~$ cp ~/cgi-bin/SWS/WWW/* ~/WWW
Ideally, I could set my filepath to "../../WWW", and skip this command, but something about Stanford's arcane file permissions is throwing up a roadblock at the moment. I will try to fix it soon!