cl-markup library
I found the library which helps writing html in lisp, that library is cl-markup. To use this library, execute the following commands.
- (ql:quickload "cl-markup")
- (defpackage html-sample (:use :cl :cl-markup))
- (in-package :html-sample)
The above commands are preparing. Output html command likes below.
(html (:head (:meta :content "text/html" :charset "UTF-8") (:title "cl-markup sample")) (:body (:p "Hello, cl-markup!")))
This command result is below, except escape characters.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta content="text/html" charset="UTF-8"> <title>cl-markup sample</title> </head> <body> <p>Hello, cl-markup!</p> </body> </html>
I added (ql:quickload :cl-markup) to ccl-init.lisp.
In my next step, how can I write file these html, not standard output. I want to make clear how to use Quicklisp easy. I will tidy the Quicklisp initialization steps.