[WIP] Begin blog index
This commit is contained in:
parent
a950f6dce8
commit
9afcb7cec8
22
src/blog/index.html.pm
Normal file
22
src/blog/index.html.pm
Normal file
@ -0,0 +1,22 @@
|
||||
#lang pollen
|
||||
|
||||
◊(require pollen/pagetree
|
||||
pollen/file
|
||||
racket/path)
|
||||
|
||||
◊(define here-path (select-from-metas 'here-path metas))
|
||||
◊(define ptree (get-pagetree (build-path
|
||||
(path-only (string->path here-path))
|
||||
'up
|
||||
"index.ptree")))
|
||||
◊(current-pagetree ptree)
|
||||
|
||||
◊(define (get-posts)
|
||||
(children 'blog))
|
||||
|
||||
◊for/splice[((post (get-posts)))]{
|
||||
◊let[((src (get-source (path->string (path->complete-path (symbol->string post))))))]{
|
||||
◊(string-append "blog/" (symbol->string post))
|
||||
◊;◊link[#:href ◊post]{◊(select 'h1 src)}
|
||||
}
|
||||
}
|
@ -1,4 +1,9 @@
|
||||
#lang pollen
|
||||
◊(require racket/string)
|
||||
|
||||
index.html
|
||||
blog
|
||||
◊`(blog
|
||||
,@(map string->symbol
|
||||
(remove "index.html"
|
||||
(filter (lambda (p) (string-suffix? p ".html"))
|
||||
(map path->string (directory-list "blog"))))))
|
||||
|
Loading…
Reference in New Issue
Block a user