guix-commits
[Top][All Lists]
Advanced

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

01/01: website: packages: Support Texinfo's markup.


From: Mathieu Lirzin
Subject: 01/01: website: packages: Support Texinfo's markup.
Date: Fri, 11 Sep 2015 20:49:17 +0000

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

commit dd5c9902adaacc6240085149ed10b8af7f511f6b
Author: Mathieu Lirzin <address@hidden>
Date:   Thu Aug 27 17:51:11 2015 +0200

    website: packages: Support Texinfo's markup.
    
    * website/www/packages.scm (package->sxml): Adapt to new Texinfo's
      markup in package description.
---
 website/www/packages.scm |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/website/www/packages.scm b/website/www/packages.scm
index 09da932..fe4fb2b 100644
--- a/website/www/packages.scm
+++ b/website/www/packages.scm
@@ -37,6 +37,8 @@
   #:use-module (ice-9 i18n)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-19)
+  #:use-module (texinfo)
+  #:use-module (texinfo html)
   #:export (packages-page))
 
 (define lookup-gnu-package
@@ -170,6 +172,12 @@ decreasing, is 1."
                             (package-transitive-supported-systems package)))
                       " ")))
 
+  (define (package-description-shtml package)
+    "Return a SXML representation of PACKAGE description field with HTML
+vocabulary."
+    (and=> (package-description package)
+           (compose stexi->shtml texi-fragment->stexi)))
+
   (define (package-logo name)
     (and=> (lookup-gnu-package name)
            gnu-package-logo))
@@ -203,7 +211,7 @@ description-ids as formal parameters."
                                  (class "package-logo")
                                  (alt ("Logo of " ,(package-name package))))))
                        (_ #f))
-                    (p ,(package-description package))
+                    (p ,(package-description-shtml package))
                     ,(license package)
                     (a (@ (href ,(package-home-page package))
                           (title "Link to the package's website"))



reply via email to

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