Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 32s
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
;; Extension — full HTML page wrapper.
|
|
|
|
(st-bootstrap-classes!)
|
|
(content/bootstrap!)
|
|
|
|
(define
|
|
d
|
|
(doc-with-title
|
|
(doc-append (doc-empty "post") (mk-heading "h" 1 "Hi"))
|
|
"My Title"))
|
|
|
|
(content-test
|
|
"page"
|
|
(content/page d)
|
|
"<!doctype html><html><head><meta charset=\"utf-8\"><title>My Title</title></head><body><h1>Hi</h1></body></html>")
|
|
|
|
(content-test
|
|
"page title escaped"
|
|
(content/page (doc-with-title (doc-empty "x") "A < B"))
|
|
"<!doctype html><html><head><meta charset=\"utf-8\"><title>A < B</title></head><body></body></html>")
|
|
|
|
(content-test
|
|
"page falls back to id"
|
|
(content/page (doc-empty "fallback"))
|
|
"<!doctype html><html><head><meta charset=\"utf-8\"><title>fallback</title></head><body></body></html>")
|
|
|
|
(content-test "page-title from meta" (content/page-title d) "My Title")
|
|
(content-test
|
|
"page-title fallback id"
|
|
(content/page-title (doc-empty "z"))
|
|
"z")
|
|
|
|
(content-test
|
|
"page body reflects edits"
|
|
(content/page (doc-update d "h" "text" "Bye"))
|
|
"<!doctype html><html><head><meta charset=\"utf-8\"><title>My Title</title></head><body><h1>Bye</h1></body></html>")
|
|
|
|
(content-test
|
|
"page multi-block body"
|
|
(content/page
|
|
(doc-append (doc-with-title (doc-empty "p") "T") (mk-text "x" "para")))
|
|
"<!doctype html><html><head><meta charset=\"utf-8\"><title>T</title></head><body><p>para</p></body></html>")
|