unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#63975: Broken link (404) in blog post breadcrumbs
@ 2023-06-09 14:52 Maxime Devos
  2023-06-10 11:43 ` pelzflorian (Florian Pelz)
  0 siblings, 1 reply; 3+ messages in thread
From: Maxime Devos @ 2023-06-09 14:52 UTC (permalink / raw)
  To: 63975


[-- Attachment #1.1.1: Type: text/plain, Size: 477 bytes --]

Go to:

https://guix.gnu.org/en/blog/2023/parameterized-packages-for-gnu-guix/

then click on the link ‘Parameterized Packages for GNU Guix’ in the 
breadcrumbs ‘Home -> Blog -> Parameterized Packages for GNU Guix’.

This goes to

https://guix.gnu.org/blog/2023/parameterized-packages-for-gnu-guix

which is a 404 Not Found.

The same issue holds for non-English translations as well.
Other blog posts are affected as well.

Best regards
Maxime Devos

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#63975: Broken link (404) in blog post breadcrumbs
  2023-06-09 14:52 bug#63975: Broken link (404) in blog post breadcrumbs Maxime Devos
@ 2023-06-10 11:43 ` pelzflorian (Florian Pelz)
  2023-06-10 18:34   ` pelzflorian (Florian Pelz)
  0 siblings, 1 reply; 3+ messages in thread
From: pelzflorian (Florian Pelz) @ 2023-06-10 11:43 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 63975

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

Maxime Devos <maximedevos@telenet.be> writes:
> then click on the link ‘Parameterized Packages for GNU Guix’ in the
> breadcrumbs ‘Home -> Blog -> Parameterized Packages for GNU Guix’.
>
> This goes to
>
> https://guix.gnu.org/blog/2023/parameterized-packages-for-gnu-guix
>
> which is a 404 Not Found.

Thank you Maxime for spotting it!

The attached patch should fix it; I still need to test if it works
before pushing.

(Old blog posts still have a redirect from
https://guix.gnu.org/blog/2019/post-url-path to
https://guix.gnu.org/en/blog/2019/post-url-path in maintenance.git,
but we do not want to add a redirect for each new blog post.)

Regards,
Florian


[-- Attachment #2: website-blog-Refer-to-the-localized-URL-in-breadcrum.patch --]
[-- Type: text/x-patch, Size: 1354 bytes --]

From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Sat, 10 Jun 2023 13:26:55 +0200
Subject: [PATCH] website: blog: Refer to the localized URL in breadcrumbs.

Fixes <https://issues.guix.gnu.org/63975>.
Reported by Maxime Devos <maximedevos@telenet.be>

* website/apps/blog/templates/post.scm (post-t)[#:crumbs]: Append a
slash to the URL, so the guix-url procedure will treat it as a web
page and localize it.
---
 website/apps/blog/templates/post.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/website/apps/blog/templates/post.scm b/website/apps/blog/templates/post.scm
index 0d6b08e..aba6fb9 100644
--- a/website/apps/blog/templates/post.scm
+++ b/website/apps/blog/templates/post.scm
@@ -1,4 +1,5 @@
 ;;; GNU Guix web site
+;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;; Initially written by sirgazil who waives all
 ;;; copyright interest on this file.
 
@@ -34,7 +35,8 @@
      #:crumbs
      (list (crumb (C_ "website menu" "Blog") (guix-url "blog/"))
 	   (crumb (post-ref post 'title)
-		  (guix-url (post-url-path post))))
+                  (guix-url (string-append (post-url-path post)
+                                           "/"))))
      #:content
      `(main
        (article

base-commit: 0250b260c880aa43fcd0bd2655d924d4719082c4
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#63975: Broken link (404) in blog post breadcrumbs
  2023-06-10 11:43 ` pelzflorian (Florian Pelz)
@ 2023-06-10 18:34   ` pelzflorian (Florian Pelz)
  0 siblings, 0 replies; 3+ messages in thread
From: pelzflorian (Florian Pelz) @ 2023-06-10 18:34 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 63975-done

Pushed as bf07f52a57505c4b12fa6b384b79751e387ae624 with some changes;
the change is effected in the post-url-path procedure now.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-10 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09 14:52 bug#63975: Broken link (404) in blog post breadcrumbs Maxime Devos
2023-06-10 11:43 ` pelzflorian (Florian Pelz)
2023-06-10 18:34   ` pelzflorian (Florian Pelz)

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).