Shirakumo / radiance

A Common Lisp web application environment
https://shirakumo.github.io/radiance/
zlib License
322 stars 19 forks source link

Can't compile DEFINE-PAGE #60

Closed Filipp-Druan closed 3 months ago

Filipp-Druan commented 1 year ago

Hello! I tried to compile this code:


(defpackage regrin-site
  (:use :cl :radiance :cl-who :lass))

(in-package regrin-site)

(defun render-home-page ()
    (with-html-output-to-string (var)
        (htm (:html5 (:head (:title "Home")
                            (:meta :charset "utf-8")
                            (:link :rel  "shortcut icon"
                                   :href "img/embleme80x80.png")
                            (:link :rel  "stylesheet"
                                   :href "promo.css"))

                     (:body
                      (:header
                       (:div :class "header_menu"
                             (:div :class "logo"
                                   (:a :href "./home.html"
                                       (:img :id  "embleme"
                                             :src "./img/i.png"
                                             :alt "embleme")))
                             (:div :class "top_menu"
                                   (:ul (:li (:a :href "./registration.html"
                                                 "Registration")))))))))))

(define-page home "/" ()
    (render-home-page))```
Result:
```; file: /tmp/slimeaMdUSO
; in: DEFINE-PAGE HOME
;     (RADIANCE-CORE:DEFINE-PAGE REGRIN-SITE::HOME
;         "/"
;         NIL
;       (REGRIN-SITE::RENDER-HOME-PAGE))
; 
; caught ERROR:
;   (during macroexpansion of (DEFINE-PAGE HOME
;       ...))
;   Module #<PACKAGE "REGRIN-SITE"> requested but while the package exists, it is not a module.
; 
; compilation unit finished
;   caught 1 ERROR condition```

How I can fix this error? I don't use ASDF system (now).
Thanks!
Filipp-Druan commented 1 year ago

Use function MODULARIZE.

Filipp-Druan commented 1 year ago

I did it and defined the page, but it isn't shows in browser!