guix-commits
[Top][All Lists]
Advanced

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

branch master updated: website: contribute: Refer to the development man


From: Ludovic Courtès
Subject: branch master updated: website: contribute: Refer to the development manual.
Date: Wed, 20 Jul 2022 10:11:34 -0400

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository guix-artwork.

The following commit(s) were added to refs/heads/master by this push:
     new d0ebc70  website: contribute: Refer to the development manual.
d0ebc70 is described below

commit d0ebc709c2cb23fd33cc22706e539aab87166898
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Jul 20 16:08:41 2022 +0200

    website: contribute: Refer to the development manual.
    
    * website/apps/base/utils.scm (manual-devel-url): New procedure.
    * website/apps/base/templates/components.scm (manual-devel-href): New
    procedure.
    * website/apps/base/templates/contribute.scm (contribute-t): Use
    'manual-devel-href' instead of 'manual-href'.
---
 website/apps/base/templates/components.scm |  6 ++++++
 website/apps/base/templates/contribute.scm |  8 ++++----
 website/apps/base/utils.scm                | 11 ++++++++++-
 3 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/website/apps/base/templates/components.scm 
b/website/apps/base/templates/components.scm
index b354d48..e1e0b23 100644
--- a/website/apps/base/templates/components.scm
+++ b/website/apps/base/templates/components.scm
@@ -29,6 +29,7 @@
            link-subtle
            link-yellow
             manual-href
+            manual-devel-href
             manual-link-yellow
            navbar
            page-indicator
@@ -256,6 +257,11 @@ manual.
   ;; The _ arguments are placeholders for args added by G_, cf. i18n-howto.txt.
   `(a (@ (href ,(manual-url subpath #:language manual-lang))) ,label))
 
+(define (manual-devel-href label manual-lang _1 subpath _2)
+  "Similar to 'manual-href', but link to the development manual."
+  ;; The _ arguments are placeholders for args added by G_, cf. i18n-howto.txt.
+  `(a (@ (href ,(manual-devel-url subpath #:language manual-lang))) ,label))
+
 (define* (manual-link-yellow label manual-lang _1 #:optional (subpath "") _2)
   "Return a link-yellow component pointing to the manual.  It can be
 used like this:
diff --git a/website/apps/base/templates/contribute.scm 
b/website/apps/base/templates/contribute.scm
index a4caa6b..f75c0c7 100644
--- a/website/apps/base/templates/contribute.scm
+++ b/website/apps/base/templates/contribute.scm
@@ -149,7 +149,7 @@ Translation|I18N|L10N|Artwork") #\|)
             "Information on how to add packages to the distribution can
             be found "
             ,(G_
-              (manual-href
+              (manual-devel-href
                "in the manual"
                (G_ "en")
                (G_ "Contributing.html")))
@@ -194,9 +194,9 @@ Translation|I18N|L10N|Artwork") #\|)
             ,(G_ `(a (@ (href 
"http://www.schemers.org/Documents/#intro-texts";))
                      "introductory material about Scheme"))
             ". Also, make sure to read the "
-            ,(G_ (manual-href "Contributing"
-                              (G_ "en")
-                              (G_ "Contributing.html")))
+            ,(G_ (manual-devel-href "Contributing"
+                                    (G_ "en")
+                                    (G_ "Contributing.html")))
             " section of the manual for more details on the development
             setup, as well as the coding and cooperation conventions used
             in the project. "))
diff --git a/website/apps/base/utils.scm b/website/apps/base/utils.scm
index 1e46d45..d172433 100644
--- a/website/apps/base/utils.scm
+++ b/website/apps/base/utils.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix web site
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic 
Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2022 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
 ;;; Copyright © 2013 Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
@@ -38,6 +38,7 @@
            latest-guix-version
             locale-display-name
            manual-url
+            manual-devel-url
             manual-url-with-language
            number*
            paginate))
@@ -142,6 +143,14 @@
                                            "/html_node/")
                             subpath) #:localize #f)))
 
+(define* (manual-devel-url #:optional (subpath "")
+                           #:key (language "en"))
+  "Similar to 'manual-url', but link to the development manual."
+  (string-append
+   (guix-url (string-append (string-append "manual/devel/" language
+                                           "/html_node/")
+                            subpath) #:localize #f)))
+
 (define* (manual-url-with-language _ language #:optional (subpath ""))
   "Shorthand for manual-url without keywords for prettier output
 PO files when marked for translation.  It can be marked for translation



reply via email to

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