guix-patches
[Top][All Lists]
Advanced

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

[bug#59385] [PATCH] website: Link to the new packages browser


From: Ludovic Courtès
Subject: [bug#59385] [PATCH] website: Link to the new packages browser
Date: Mon, 21 Nov 2022 12:05:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi,

Luis Felipe <luis.felipe.la@protonmail.com> skribis:

> From ad0effaab60acdb7bd0e533bd544b49a4bee8a2b Mon Sep 17 00:00:00 2001
> From: Luis Felipe <luis.felipe.la@protonmail.com>
> Date: Sat, 19 Nov 2022 08:21:04 -0500
> Subject: [PATCH] website: Link to the new packages browser.
>
> Update all package-related links to point to the newly deployed browser
> at https://packages.guix.gnu.org/.
>
> * website/apps/base/utils.scm (packages-url): New procedure.
> * website/apps/base/data.scm (contact-media): Use packages-url.
> * website/apps/base/templates/components.scm (navbar): Likewise.
> * website/apps/base/templates/contribute.scm (contribute-t): Likewise.
> * website/apps/base/templates/donate.scm (donate-t): Likewise.
> * website/apps/base/templates/home.scm (home-t): Likewise.

Awesome, pushed!

While we’re at it, can we also disable individual package page
generation?  It takes a lot of time to build and uses quite a lot of
space as well; I’m eager to see them go.  :-)

Maybe we can add a redirect from <https://guix.gnu.org/en/packages>
pages like this:

diff --git a/hydra/modules/sysadmin/nginx.scm b/hydra/modules/sysadmin/nginx.scm
index 3c3456d..0a8b1a8 100644
--- a/hydra/modules/sysadmin/nginx.scm
+++ b/hydra/modules/sysadmin/nginx.scm
@@ -75,6 +75,13 @@ synonymous IETF language tags that should be mapped to the 
same $lang."
 
 (define guix.gnu.org-redirect-locations
   (list
+   (nginx-location-configuration
+    (uri "~ /packages/.*")
+    (body (list "return 301 https://packages.guix.gnu.org";)))
+   (nginx-location-configuration
+    (uri "~ /([^/]+)/packages/.*")
+    (body (list "return 301 https://packages.guix.gnu.org";)))
+
   ;; Short URL for the installation script
   (redirect "/install.sh" 
"https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh";)
   ;; What follows is a list of redirects for URLs that used to be
If we’re serious about it, we can try to match the package/version in
URLs like <https://guix.gnu.org/en/packages/julia-mappedarrays-0.4.0/>
and redirect to the right one.  Not sure if that’s worth the trouble
though.

Thanks!

Ludo’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]