haunt.scm 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. (use-modules (dustycloud templates)
  2. (haunt asset)
  3. (haunt html)
  4. (haunt site)
  5. (haunt page)
  6. (haunt post)
  7. (haunt utils)
  8. (haunt reader commonmark)
  9. (haunt reader skribe)
  10. (haunt reader)
  11. (haunt builder blog)
  12. (haunt builder atom)
  13. (haunt builder rss)
  14. (haunt builder assets)
  15. (commonmark)
  16. (markdown)
  17. (flat-files)
  18. (html-reader))
  19. (define dustycloud-haunt-theme
  20. (theme #:name "Dustycloud Brainstorms"
  21. #:layout
  22. (lambda (site title body)
  23. (base-tmpl
  24. site body
  25. #:title title))
  26. #:post-template post-tmpl
  27. #:collection-template collection-tmpl
  28. #:pagination-template pagination-tmpl))
  29. (define (archive-page site posts)
  30. (make-page
  31. "archive/index.html"
  32. (archive-tmpl site posts)
  33. sxml->html))
  34. (define builders
  35. (list (blog #:theme dustycloud-haunt-theme
  36. #:prefix "/blog"
  37. #:posts-per-page 10)
  38. archive-page
  39. (flat-files "pages"
  40. #:templates flat-templates)
  41. (atom-feed #:blog-prefix "/blog")
  42. (static-directory "static/css" "etc/css")
  43. (static-directory "static/images" "etc/images")
  44. (static-directory "static/js" "etc/js")
  45. (static-directory "static/flier" "etc/flier")))
  46. (define (indexified-slug post)
  47. (string-append (post-slug post) "/index"))
  48. (site #:title "Dustycloud Brainstorms"
  49. #:domain "dustycloud.org"
  50. #:default-metadata
  51. '((author . "Christine Lemmer-Webber")
  52. (email . "cwebber@dustycloud.org"))
  53. #:readers (list skribe-reader
  54. commonmark-reader*
  55. html-reader*
  56. sxml-reader)
  57. #:builders builders
  58. #:make-slug indexified-slug)