~filiplajszczak/filip-lajszczak-dev

9d7aaa4c8855a56f609f8b46dddac3db12c1702f — Filip Lajszczak 9 months ago 855d008 master
uses guile-algorithms package

Guile-algorithms are now packaged in Guix and no longerneed to be vendored.
4 files changed, 12 insertions(+), 28 deletions(-)

M .build.yml
A build-manifest.scm
A publish.sh
M theme.scm
M .build.yml => .build.yml +5 -11
@@ 1,18 1,12 @@
image: guix 
packages:
  - haunt
  - hut
  - guile-commonmark
oauth: pages.sr.ht/PAGES:RW
sources:
  - git+https://git@git.sr.ht/~filiplajszczak/filip-lajszczak-dev
environment:
  site: filip.lajszczak.dev
tasks:
- package: |
    cd filip-lajszczak-dev 
    haunt build
    tar -C site -cvz . > ../site.tar.gz
- upload: |
    hut pages publish -d $site site.tar.gz

- guix: |
    guix pull
- shell: |
    cd filip-lajszczak-dev
    guix shell -m build-manifest.scm -- ./publish.sh
\ No newline at end of file

A build-manifest.scm => build-manifest.scm +2 -0
@@ 0,0 1,2 @@
(specifications->manifest
 '("haunt" "hut" "guile" "guile-algorithms"))
\ No newline at end of file

A publish.sh => publish.sh +4 -0
@@ 0,0 1,4 @@
#!/bin/sh
haunt build
tar -C site -cvz . > site.tar.gz
hut pages publish -d $site site.tar.gz

M theme.scm => theme.scm +1 -17
@@ 1,28 1,12 @@
(define-module (theme)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-19)
  #:use-module (algorithms)
  #:use-module (haunt builder blog)
  #:use-module (haunt site)
  #:use-module (haunt post)
  #:export (little-theme))

(define* (sliding lst size #:optional (step 1))
  (define (tail-call lst)
    (if (>= size (length lst))
      (list lst)
      (cons (take lst size)
        (tail-call (drop lst step)))))
  (cond
    [(> step (length lst))
      (throw
        'inconsistent-arguments
        "step has to be equal to or smaller then length of the list")]
    [(= step (length lst)) (list lst)]
    [else (tail-call lst)]))

(define (chunks-of lst k)
  (sliding lst k k))

(define (littlify-sxml sxml)
  (define (convert-to-tr pair)
    (list