Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
Update hugo.scm
Browse files Browse the repository at this point in the history
  • Loading branch information
technicat committed Aug 21, 2023
1 parent ced0098 commit 213d981
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion hugo.scm
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,15 @@
(define (place-address place)
(res-value "address" place))

(define (place-links place)
(res-value "links" place))

(define (link-name link)
(res-value "name" link))

(define (link-url link)
(res-value "URL" link))

(define (read-places)
(let ((us (read-json "assets/json/place/us.json")))
(map (lambda (file)
Expand Down Expand Up @@ -321,5 +330,19 @@

(define (write-region-place place out)
(h2 (place-title place) out)
(write-place-address place out)
(write-place-links place out)
(news out))

(define (write-place-address place out)
(write-string (place-address place) out)
(news out))
(news out))


(define (write-place-links place out)
(for-each (lambda (link)
(write-place-link link out))
(place-links place)))

(define (write-place-link link out)
(bullet (linkstr (link-name link) (link-url link)) out))

0 comments on commit 213d981

Please sign in to comment.