[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Prototype of revamped web site setup



Hi

The current debian.org web site uses wml, which is both aged and pretty
slow.  I was told that even the upstream of wml suggested to go moving
away.

Once upon a time, wouter tried to use the CI on our GitLab instance.
A single build burned like ten CPU hours, which is insane.  So it got
disabled pretty quickly.

I started to look at some current static page generators to see if they
could help for what we do with out web site.  Mainly this is
- support for different types of pages,
- multi language support and
- incorporated data like the mirror list.

In the end I settled with Hugo[1] to give it a try.  Current state is
hosted here https://salsa.debian.org/waldi/debian.org-hugo/ and can be
viewed here https://waldi.pages.debian.net/debian.org-hugo/.  The theme
is just a plain example one.

## Multi language support

Hugo support multi language sites.  However it only supports the
"distinct site" style, e.g. / is english, /fr/ is french.  Now the
question is, how much are you invested in the current language detection
style site, or if switching to a different style would be okay?

English home page:
https://waldi.pages.debian.net/debian.org-hugo/

French home page:
https://waldi.pages.debian.net/debian.org-hugo/fr/

Also I tried automatic language fallback, aka an article not available
in a language is listed in the english variant:
https://waldi.pages.debian.net/debian.org-hugo/fr/post/

## Alias for backward compatibility

Hugo supports creating "aliases" for pages, which comes out as just a
minimal html file with a refresh redirect to the real page.  This could
be used to make the site backward comaptible.

See https://waldi.pages.debian.net/debian.org-hugo/index.fr.html

## Distinct page style for DSA

See https://waldi.pages.debian.net/debian.org-hugo/update/dsa/dsa-4347/

This page content is generated out of two files:
https://salsa.debian.org/waldi/debian.org-hugo/-/blob/master/data/update/dsa-4348.yaml
https://salsa.debian.org/waldi/debian.org-hugo/-/blob/master/content/en/update/dsa/dsa-4348.md

I'm not sure yet, what you could do with it, like generating stubs if
there is not text available or what else.

(Do we really need to provide all the DSA, in multiple languages, forever?)

## Speed

A page with 40000 or so pages takes at most 2 minutes on my workstation
to build.  Sure, a lot of the stuff that heavily crunches data is not in
yet, but I assume we can expect single digit minutes build time.

Maybe we can do something with it.

Regards,
Bastian

[1]: https://gohugo.io/
-- 
You're dead, Jim.
		-- McCoy, "The Tholian Web", stardate unknown


Reply to: