Re: [AD] another web site proposal

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, 2008-11-08 at 12:55 +1100, Peter Wang wrote:
> This is a silly web site proposal based on being as simple as possible.
> 
> The content of each page is stored in either a single file or a
> directory.  A single file page like `introduction.html` is generated by
> concatenating these files together:
> 
>     en/inc.a.*
>     en/introduction
>     en/inc.z.*
> 
> A page made from a directory, like the news page, is generated by
> concatenating these files together:
> 
>     en/inc.a.*
>     en/news/*
>     en/inc.z.*
> 
> Filenames are sorted, except that sequences of files with dates in them
> are *reverse* sorted, e.g.
> 
>     en/news/a.header
>     en/news/news.2008-11-02
>     en/news/news.2008-10-01
>     en/news/news.2008-09-10
>     en/news/z.footer
> 
> To create a news item, just add a new file in `en/news`.  Old news items
> can just be moved to `en/oldnews`.
> 
> The concatenated results are run through Pandoc, so any content can be
> written with Markdown syntax, but you can also insert any HTML you need.

I think it's most excellent. It's strange how custom solutions just
always end up looking much better to use than some premade template
system.

> Translations would work by overriding files in the `en` directory.
> e.g. take `es/foo` if it exists, otherwise fall back to `en/foo`.
> I think each language would live in its own subdirectory so that
> relative links don't need rewriting, e.g. linking to `news.html` takes
> you to the news page for the current language rather than English.
> Common data between languages could be shared using symlinks.
> 

Maybe translations can be handled by gettext instead - it's a widely
used standard for translation in open source projects and would allow
using all the existing translation tools.

Basically, all that's needed for gettext is a way to extract
translatable strings. Usually they look like this: _"translatable" -
i.e. underscore than quoted string. But any way to extract the strings
works I think, can probably check if pandoc already has something for
it.

However, I assume we don't really expect things to change much, so
probably just the languagge files like you suggested would be enough..
and gettext likely can be added later rather easily, adding translations
to a project at a later time is how gettext usually works anyway.

> That's it!  Could everyone live with that?  Is there anything else we
> need?  RSS support?
> 
> Peter
> 
> P.S. I've attached an example.  It's not styled properly.  I wrote the
> script in zsh but it obviously could be rewritten in any language easily.
> Translations aren't handled.

I'd prefer a python script - but installing zsh will be no problem for
now. And the style already looks nice, maybe have something in between
the old CSS and this one - the font used in the original site is less
readable.. maybe with a slight yellowish tone as background for the
side-bar and the logo on top it's already good to go :)

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/