Hacks for not having modules yet, so lazy.lol
This commit is contained in:
parent
115c5573c4
commit
3c04f76508
4 changed files with 21 additions and 5 deletions
|
@ -1,6 +1,4 @@
|
||||||
(define-module (guile-docs docs)
|
(use-modules (srfi srfi-9))
|
||||||
#:use-module (srfi srfi-9)
|
|
||||||
#:export (docs-in-module))
|
|
||||||
|
|
||||||
(define-record-type <doc>
|
(define-record-type <doc>
|
||||||
(make-doc module symbol documentation)
|
(make-doc module symbol documentation)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;; TODO: move to modules - need to set up pre-inst-env or w/e
|
;; TODO: move to modules - need to set up pre-inst-env or w/e
|
||||||
(define overall-wrapper (load "overall-wrapper.scm"))
|
(load "overall-wrapper.scm")
|
||||||
|
|
||||||
(overall-wrapper
|
(overall-wrapper
|
||||||
'(main
|
'(main
|
||||||
|
|
18
public/module.scm
Normal file
18
public/module.scm
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
(load "overall-wrapper.scm")
|
||||||
|
|
||||||
|
(load "../guile-docs/docs.scm")
|
||||||
|
|
||||||
|
(define (render-module module)
|
||||||
|
(let ((docs (docs-in-module module)))
|
||||||
|
(overall-wrapper
|
||||||
|
`(main ,(map render-doc docs)))))
|
||||||
|
|
||||||
|
|
||||||
|
(define (render-doc doc)
|
||||||
|
`((hgroup
|
||||||
|
(h1 ,(doc-symbol doc))
|
||||||
|
(p "In " ,(doc-module doc)))
|
||||||
|
(p ,(or (doc-documentation doc) ""))))
|
||||||
|
|
||||||
|
|
||||||
|
(render-module (resolve-interface '(srfi srfi-19)))
|
|
@ -1,5 +1,5 @@
|
||||||
;; todo: module
|
;; todo: module
|
||||||
(lambda (content)
|
(define (overall-wrapper content)
|
||||||
`(html
|
`(html
|
||||||
(link (@ (rel "stylesheet")
|
(link (@ (rel "stylesheet")
|
||||||
(type "text/css")
|
(type "text/css")
|
||||||
|
|
Loading…
Reference in a new issue