networkupstools / nut-website

Network UPS Tools website and protocol library
6 stars 14 forks source link

Rearrange website generation to serve both current "master" info and frozen data for (some?) tagged releases #25

Closed jimklimov closed 2 years ago

jimklimov commented 3 years ago

For example, now that we have had a long time passed after the last (2.7.4) official release, there is a large gap between content that can be relevant to users of distro-provided NUT packages vs. current information matching the evolving codebase on github. Hopefully future gaps will be smaller, but still inevitable.

I have experimented with this a bit, and concluded that GitHub Pages integration only allows one web-site per organization. There can be additional repositories with Pages enabled, whose repo name is a "sub-URI" in that one website.

We can use sub-domain names with web-redirection from Gandi DNS+ hosting to point from "simple" (and non-SSL) Web server names like http://master.networkupstools.org/ to the URI we want, but then the users would browse unwieldy https://networkupstools.org/networkupstools-master.github.io/ (where "networkupstools-master.github.io" comes from https://github.com/networkupstools/networkupstools-master.github.io/ repo).

A possibly better solution would be to use just one git repository for the resulting generated website, but define a sub-directory structure for data populated from release-tagged NUT/NUT-DDL(/...?) sources. This way the main site evolves as it did, generating stuff from master branches, and the frozen-in-time sub spaces are generated once. There is probably some content that might cause their regeneration (changes to page layout? bottom-banners especially if dictated by sponsors/partners? left menu?..) but that would be rare - at least, original version-dependent content should remain.

This approach may however need re-engineering of some generated links (e.g. there is no point storing historic archives many times), though there may be some mess around NUT DDL (especially for "new" datapoints about discovered device support with older NUT releases)...

jimklimov commented 2 years ago

Implemented over time with considerations above, now the scripts in this repository can make use of NUT_HISTORIC_RELEASE naming a tag to build a sub-site for.

Tested to make a NUT v2.7.4 sub-site and a v2.8.0-rc1