summaryrefslogtreecommitdiff
path: root/website/README
blob: b5a565e358554bbfc916f3add4dc87d1255d2a1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
-*- mode: org -*-

#+TITLE: GuixSD website

This directory contains the source files for the GuixSD website,
available at https://www.gnu.org/software/guix/.

  - =www.scm= and =www= provide the =(www)= guile module which
    offers services for building the website locally.
  - =static= contains images and css for the website.
  - =mockup.svg= illustrates a homepage aimed at average users.
    This is for use when GuixSD is getting closer to a
    production-ready system.
  - =mockup-techie.svg= illustrates a homepage aimed at
    skilled devs and sysadmins.  This is for use during the
    alpha phase of development.

* Dependencies

To be able to work on the website, you need the following software:

  - [[https://www.gnu.org/software/guile/][GNU Guile]] (programming language)
  - [[https://gnutls.org/][GnuTLS]] (Transport Layer Security Library)
  - [[http://haunt.dthompson.us/][Haunt]] (static site generator)
  - [[http://savannah.nongnu.org/projects/guile-json/][Guile-JSON]] (to produce the =packages.json= file)

Additionally, [[https://www.gnu.org/software/guix/][GNU Guix]] source code is needed to generate the
package-related pages of the website. You can clone the latest source
as follows:

#+BEGIN_EXAMPLE
$ cd path/to/directory/of/your/choice
$ git clone git://git.savannah.gnu.org/guix.git
#+END_EXAMPLE

* Building and running

To try out the website locally while you work on it, run the following
commands:

#+BEGIN_EXAMPLE
$ cd path/to/guix-artwork/website
$ GUIX_WEB_SITE_LOCAL=yes haunt build
$ haunt serve
#+END_EXAMPLE

Then, visit http://localhost:8080/ in a web browser.

* Building and running special pages

Currently, there are two pages, [[https://www.gnu.org/software/guix/packages][packages]] and [[https://www.gnu.org/software/guix/packages/issues.html][issues]], that are not
built using *Haunt*. To build them, and try them out locally, do the
following:

1. Add the directory containing the source code of GNU Guix to the
   ~GUILE_LOAD_PATH~ environment variable.
2. Build the part of the website that builds with *Haunt*:

   #+BEGIN_EXAMPLE
   $ cd path/to/guix-artwork/website
   $ GUIX_WEB_SITE_LOCAL=yes haunt build
   #+END_EXAMPLE

3. Copy the ~static~ directory to the build directory:

   #+BEGIN_EXAMPLE
   $ mkdir -p site/software/guix
   $ cp -avr static site/software/guix
   #+END_EXAMPLE

4. Open the [[https://www.gnu.org/software/guile/manual/html_node/The-REPL.html#The-REPL][Guile REPL]] to import the ~packages~ module and build
   Packages and Issues pages:

   #+BEGIN_EXAMPLE
   $ guile
   scheme@(guile-user)> (use-modules (www) (www packages))
   scheme@(guile-user)> (export-web-page (packages-page) "site/packages/index.html")
   scheme@(guile-user)> (export-web-page (issues-page) "site/packages/issues.html")
   scheme@(guile-user)> ,q
   #+END_EXAMPLE

5. Serve the whole website with *Haunt*:

   #+BEGIN_EXAMPLE
   $ haunt serve
   #+END_EXAMPLE

Now you can try the special pages out:

  - http://localhost:8080/packages/
  - http://localhost:8080/packages/issues.html

* Deploying

Pending...

* Copying

** Guile code

See [[file:COPYING][COPYING]].

** Graphics

Public domain 2015 [[mailto:felipe.lopez@openmailbox.org][Luis Felipe López Acevedo]]

All the graphics in this directory are dedicated to the public domain, except
for the Guix System Distribution logo, which can be used under the Creative
Commons Attribution-ShareAlike 4.0 International License.

You can find information about authors and copyright in the metadata of SVG
files. If you are using Inkscape, you can access the Document metadata from
the File menu.