Skip to content
Commits on Source (3)
pages:
image:
name: zimoun/guix-foundation:v1
script:
- cd website
- haunt build
- cd ..
- mv website/site public
artifacts:
paths:
- public
-*- mode: org -*-
#+TITLE: Guix Foundation website
* Building
#+begin_example
guix shell -C -m manifest.scm \
-- haunt build
#+end_example
* Running
#+begin_example
guix shell -C -m manifest.scm \
-- haunt serve -w
#+end_example
Then, visit http://localhost:8080 in a web browser.
You can stop the server pressing ~Ctrl + C~ twice.
* Packing
#+begin_example
# Generate Docker images
docker load \
< $(guix time-machine -q \
--commit=6113e0529d61df7425f64e30a6bf77f7cfdfe5a5 \
-- pack \
-f docker \
-C none \
-S /bin=bin \
-S /lib=lib \
-S /share=share \
-S /etc=etc \
-m manifest.scm \
--save-provenance)
# Tag
docker tag <IMAGE ID> zimoun/guix-foundation:<my-version>
# Push
docker login --username=zimoun
docker push zimoun/guix-foundation:<my-version>
# Build
docker run -v `pwd`:`pwd` -w `pwd` -ti <TAG> \
haunt build
#+end_example
......@@ -42,6 +42,10 @@
static-site))
;;; XXXX: Workaround for relative path and Haunt
(define %online-location
"https://zimoun.frama.io/guix-foundation/")
(define-record-type <picture>
(make-picture filename caption)
......@@ -217,7 +221,7 @@ the title and the menu."
`(div (@ (class ,(string-append "carousel-item"
(if (eq? picture (list-ref carousel 0))
" active" ""))))
(img (@ (src ,(string-append "/images/carousel/"
(img (@ (src ,(string-append %online-location "/images/carousel/"
(picture-filename picture)))
(class "d-block w-100")
(alt ,(picture-caption picture))))
......@@ -253,17 +257,17 @@ the title and the menu."
,@(map (lambda (file)
`(link (@ (rel "stylesheet")
(type "text/css")
(href ,(string-append "/assets/css/" file)))))
(href ,(string-append %online-location "/assets/css/" file)))))
css)
,@(map (lambda (file)
`(script (@ (src ,(string-append "/assets/js/" file)))))
`(script (@ (src ,(string-append %online-location "/assets/js/" file)))))
js)
(title ,(string-append title " — " (site-title site))))
(body (@ (class "container"))
(div (@ (id "header") (class "row"))
,(if logo
`(div (@ (class "col-6 col-lg-3 align-self-center"))
(img (@ (src ,(string-append "/images/" logo))
(img (@ (src ,(string-append %online-location "/images/" logo))
(style "width:100%;") ; work-around until other images are styled
(class "img-fluid")
(alt "Logo"))))
......
......@@ -22,8 +22,8 @@
(define ge-sitemap
(sitemap #:name "ge"
#:title "Guix Europe"
#:shorttitle "Guix Europe"
#:title "Guix Foundation"
#:shorttitle "Guix Foundation"
#:chapters
(list
(chapter #:name "foundation" #:title "Foundation"
......@@ -62,13 +62,13 @@
(define ge-js '("bootstrap-bundle-5.1.3.js"))
(define (file-filter name)
"Ignore files ending with a ~, which are backup copies made by my editor,
"Ignore files ending with a ~, which are backup copies made by some editor,
as well as files ending with .swp."
(not (or (eqv? (string-ref name (- (string-length name) 1)) #\~)
(and (>= (string-length name) 4)
(string=? (string-take-right name 4) ".swp")))))
(site #:title "Guix Europe"
(site #:title "Guix Foundation"
#:domain "guix-europe.gnu.org"
#:default-metadata
'((author . "Andreas Enge")
......
(specifications->manifest
(list
"busybox"
"haunt"))