Re: [dev] [sw] Suckless web-framework

From: Nibble <nibble.ds_AT_gmail.com>
Date: Mon, 5 Apr 2010 03:33:56 +0200

Hi,

On Sun, 4 Apr 2010 17:49:18 +0100
Kai Hendry <hendry_AT_iki.fi> wrote:

> I don't like URLs with "sw.cgi" in them or the .md suffix.

You can use the name that you want, just rename sw.cgi and edit the
variable "BIN="/sw.cgi". Then configure your http server for treating
that file or the files under the directory containing sw as cgi's
(ScriptAlias, Options ExecCGI, etc. in apache).

> Why CGI? I prefer the compiler type approach of ikiwiki.info

Well, It's a matter of taste. I just wanted a minimal framework that
generates the website from a file system structure, treating folder as
sections and files as contents. So I can use, for example, mercurial
and vim to maintain and edit the site.

I don't want to deal with big configuration files or thousands of
options and scripts... just copy one cgi to a folder and go :)

> The first bit of code with the window.location= can surely be done
> better with an Apache CGI catchall redirect thing. Same does for the
> next block which I assume is some sort of 404 handler.

Maybe, but I wanted to do that from inside of the cgi, not depending on
the http server configuration of the user. Plus, when it has to do with
security issues.

> As for HTML, don't use <div class="header">. Use <header>.
> Same goes for <div id="footer">
> Instead of <div id=\"side-bar\">, use <menu>

Is it just a aesthetic issue?

> Collapse that charset stuff just to:
> <meta charset="utf-8" />

Fixed :)

> Use http://validator.nu/ for validation. I think it's worth it. :)
> -HTML5 fan boy
> http://hendry.iki.fi

Kind regards,
-- nibble
Received on Mon Apr 05 2010 - 01:33:56 UTC

This archive was generated by hypermail 2.2.0 : Mon Apr 05 2010 - 01:36:02 UTC