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

Re: Prototype of revamped web site setup

Hi Bastian!

On Wed, 3 Feb 2021 20:31:03 +0100
Bastian Blank <waldi@debian.org> wrote:

> 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.

I (and to a lesser extent @xtaran ( https://github.com/xtaran /
https://axel.beckert.ch/ )) are the upstream of wml and I can confirm that I
recommend against using it for new sites:


* https://web-cpan.shlomifish.org/latemp/

Moreover, as I note in the first link:

The main take-away from this essay is that I
cannot in good conscience recommend against writing your own
custom/ad-hoc/home-grown static site generator ("SSG") based on some
lower-level tools, rather than going through the trouble of learning an
existing open source one. Feel free to publish your own creation as open source
as well, but you should anticipate that it is most probably not going to be

> 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.

This is not surprising, but note that wml may be somewhat faster now.

> 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/

Can one write a plugin for hugo (or patch it) to use the existing behaviour?

> ## 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

It'd be better to use redirects in the web service level.
> ## 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.

You probably mean "A website with 40000 or so pages", but that sounds very



> Regards,
> Bastian
> [1]: https://gohugo.io/


Shlomi Fish       https://www.shlomifish.org/
NSA Factoids - https://www.shlomifish.org/humour/bits/facts/NSA/

Cliff: And he takes losing (like with me - I won two rounds out of three)
amazingly well. Says that he can learn more from a lost fight than from
a fight he’s won.
    — https://www.shlomifish.org/humour/Buffy/A-Few-Good-Slayers/

Please reply to list if it's a mailing list post - https://shlom.in/reply .

Reply to: