David Thompson <[email protected]> skribis:

> Mathieu Lirzin <[email protected]> writes:
>
>> This patch is a draft for the html->sxml website conversion.
>
> Looking good!

Indeed!

> But, I have one comment overall about our development strategy:
>
> I see a lot of absolute paths like
> '/software/guix/static/base/css/base.css'.  These will of course work
> when viewing the site on gnu.org, but how do we develop the site on our
> own computers?

I was wondering too, does IceCat have a plug-in to specify the root of
such URLs?

> Ideally, I'd like to be able to generate the site and serve it with
> Guile's HTTP server to see what the result looks like before
> committing patches.

Sure.  I think what Mathieu provides is a good first step, and I’ll
happily commit the wrapped-lines version if there are no objections.

The next step would be to introduce a (www utils) module, say.  It would
have, among other things:

  (define current-url-root
    (make-parameter "/"))

  (define (static-url-base)
    (string-append (current-url-root) "/static/base"))

  (define (css-url file)
    (string-append (static-url-base) "/css"))

and so on.  The pages would be modified to use these procedures instead
of hard-coded paths.

How does that sound?

Thanks, Mathieu!

Ludo’.

Reply via email to