guix-commits
[Top][All Lists]
Advanced

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

02/02: website: news: Syntax-highlight older posts.


From: Ludovic Courtès
Subject: 02/02: website: news: Syntax-highlight older posts.
Date: Fri, 14 Apr 2017 08:33:08 -0400 (EDT)

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

commit 912b1b6efe8c6f6eef55038fcfe279d136a00d44
Author: Ludovic Courtès <address@hidden>
Date:   Fri Apr 14 11:46:22 2017 +0200

    website: news: Syntax-highlight older posts.
    
    * website/posts/guixsd-system-tests.sxml,
    website/posts/service-composition-in-guixsd.sxml:
    Use (pre (code (@ (class "language-scheme")) ...)) to get syntax
    highlighting.
---
 website/posts/guixsd-system-tests.sxml           | 4 ++--
 website/posts/service-composition-in-guixsd.sxml | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/website/posts/guixsd-system-tests.sxml 
b/website/posts/guixsd-system-tests.sxml
index bed3854..a197870 100644
--- a/website/posts/guixsd-system-tests.sxml
+++ b/website/posts/guixsd-system-tests.sxml
@@ -99,8 +99,8 @@
             "‘uname’")
          " system call returns something that matches the OS declaration looks 
like this:"
          (br))
-      (div (@ (class "example"))
-           (pre "(define (run-test)\n  (define os\n    ;; The declaration of 
the OS we want to instantiate and test.\n    ;; Calling 
'marionette-operating-system' instruments it.\n    
(marionette-operating-system\n     (operating-system\n       (host-name 
\"komputilo\")\n       (timezone \"Europe/Berlin\")\n       (locale 
\"en_US.UTF-8\")\n\n       (bootloader (grub-configuration (device 
\"/dev/sdX\")))\n       (file-systems %base-file-systems))))\n\n  ;; Compute 
the script to run OS in  [...]
+      (pre (code (@ (class "language-scheme"))
+                 "(define (run-test)\n  (define os\n    ;; The declaration of 
the OS we want to instantiate and test.\n    ;; Calling 
'marionette-operating-system' instruments it.\n    
(marionette-operating-system\n     (operating-system\n       (host-name 
\"komputilo\")\n       (timezone \"Europe/Berlin\")\n       (locale 
\"en_US.UTF-8\")\n\n       (bootloader (grub-configuration (device 
\"/dev/sdX\")))\n       (file-systems %base-file-systems))))\n\n  ;; Compute 
the script to run OS in [...]
       (p "There are interesting things going on here.  First, while this is 
all Scheme code, there are in fact three tiers or strata of code at play here: 
the code that produces the OS declaration and the derivation, the build code of 
that derivation—the test—embodied in a "
          (a (@ (href 
"https://www.gnu.org/software/guix/manual/html_node/G_002dExpressions.html";))
             "g-expression")
diff --git a/website/posts/service-composition-in-guixsd.sxml 
b/website/posts/service-composition-in-guixsd.sxml
index 349a396..499432a 100644
--- a/website/posts/service-composition-in-guixsd.sxml
+++ b/website/posts/service-composition-in-guixsd.sxml
@@ -101,12 +101,12 @@
          (br))
       (p "The API makes it easy to see how services contributed to a specific 
service’s configuration.  For instance, the following expression shows the PAM 
service as extended by other declared services:"
          (br))
-      (div (@ (class "example"))
-           (pre "(fold-services (operating-system-services os) \n              
 #:target-type pam-root-service-type)\n"))
+      (pre (code (@ (class "language-scheme"))
+                 "(fold-services (operating-system-services os) \n             
  #:target-type pam-root-service-type)\n"))
       (p "The result is a service object whose value is a list of pam-service 
objects.  Likewise, the following expression returns the /etc service, whose 
value is a list of entries to be added to /etc:"
          (br))
-      (div (@ (class "example"))
-           (pre "(fold-services (operating-system-services os) \n              
 #:target-type etc-service-type)\n"))
+      (pre (code (@ (class "language-scheme"))
+                 "(fold-services (operating-system-services os) \n             
  #:target-type etc-service-type)\n"))
       (p "This contrasts with the approach taken by "
          (a (@ (href "http://nixos.org/";)) "NixOS")
          ", GuixSD’s cousin, and described in this "



reply via email to

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