all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] website: Add support for Haunt.
@ 2015-11-03 21:26 Mathieu Lirzin
  2015-11-03 23:21 ` Thompson, David
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Mathieu Lirzin @ 2015-11-03 21:26 UTC (permalink / raw)
  To: guix-devel

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

Hello Guix,

Thanks to Alex Vong's impulse, I have implemented a first step in the
use of Dave Thompson's site generator Haunt (http://haunt.dthompson.us/)
for the GuixSD website.

I will need more details on the deployment of the website on gnu.org to
hopefully get rid of the parameter objects tweaking.

--
Mathieu Lirzin


[-- Attachment #2: 0001-website-Add-support-for-Haunt.patch --]
[-- Type: text/x-diff, Size: 3390 bytes --]

From cb8c7cde36d46d226fbe1f7f553304e850ef43ac Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@gnu.org>
Date: Tue, 3 Nov 2015 22:02:07 +0100
Subject: [PATCH] website: Add support for Haunt.

This provides a simple way to build the website locally.

* website/guixsd.scm: New file.
* website/README: Document the new build process.
---
 website/README     | 11 +++++++----
 website/guixsd.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 4 deletions(-)
 create mode 100644 website/guixsd.scm

diff --git a/website/README b/website/README
index 9112726..b6d60f4 100644
--- a/website/README
+++ b/website/README
@@ -15,10 +15,13 @@ website]] which is implemented in [[https://www.gnu.org/software/guile][Guile]]
 
 * Building
 
-In this implementation, links assume =/software/guix= is the root directory of
-the website.  In order to build the website on your machine, you will want to
-modify the values of ‘(current-url-root)’ and ‘(gnu.org-root)’ parameter
-objects.
+Building the website depends on the static site generator:
+
+  - [[http://haunt.dthompson.us/][Haunt]]
+
+To build the site, run ‘haunt build -c guixsd.scm’ to compile all of
+the HTML pages.  To view the results, run ‘haunt serve -c guixsd.scm’
+and visit <http://localhost:8080> in a web browser.
 
 * Copying
 
diff --git a/website/guixsd.scm b/website/guixsd.scm
new file mode 100644
index 0000000..41d1509
--- /dev/null
+++ b/website/guixsd.scm
@@ -0,0 +1,45 @@
+;;; GuixSD website --- GNU's advanced distro website
+;;; Copyright © 2015 Mathieu Lirzin <mthl@gnu.org>
+;;;
+;;; This file is part of GuixSD website.
+;;;
+;;; GuixSD website is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; GuixSD website is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GuixSD website.  If not, see <http://www.gnu.org/licenses/>.
+
+(use-modules (haunt site)
+             (haunt reader)
+             (haunt page)
+             (haunt html)
+             (haunt utils)
+             (haunt builder assets)
+             (ice-9 match)
+             (www)
+             (www utils))
+
+(site #:title "GNU's advanced distro and transactional package manager"
+      #:domain "gnu.org/software/guix"
+      #:default-metadata
+      '((author . "GuixSD Contributors")
+        (email  . "guix-devel@gnu.org"))
+      #:readers (list sxml-reader)
+      #:builders
+      `(,@(map (match-lambda
+                 ((file-name contents)
+                  (lambda (site posts)
+                    (parameterize
+                        ((current-url-root "")
+                         (gnu.org-root "https://www.gnu.org"))
+                      (make-page file-name (contents) sxml->html))))
+                 (_ const))
+               %web-pages)
+        ,(static-directory "static")))
-- 
2.6.1


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

end of thread, other threads:[~2015-11-16 23:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 21:26 [PATCH] website: Add support for Haunt Mathieu Lirzin
2015-11-03 23:21 ` Thompson, David
2015-11-04  0:21 ` Daniel Pimentel
2015-11-05 21:25 ` Ludovic Courtès
2015-11-05 21:48   ` Thompson, David
2015-11-05 23:50     ` Mathieu Lirzin
2015-11-06 14:28       ` Thompson, David
2015-11-06 15:11         ` Luis Felipe López Acevedo
2015-11-06 20:47     ` Ludovic Courtès
2015-11-06 20:58       ` Thompson, David
2015-11-07 11:04         ` Ludovic Courtès
2015-11-09 19:09           ` Thompson, David
2015-11-10 12:17 ` Alex Vong
2015-11-10 16:37   ` Mathieu Lirzin
2015-11-11  5:14     ` Alex Vong
2015-11-16 23:45       ` Mathieu Lirzin

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.