Update domain name to kpe.io
[lml2.git] / doc / readme.lml
1 ;;; -*- Mode: Lisp -*-
2
3 (in-package #:lml2)
4
5 (html-file-page ("readme")
6   (html      
7    (:head
8     (:title "LML2 README")
9     ((:meta :http-equiv "Content-Type" :content "text/html; charset=iso-8859-1"))
10     ((:meta :name "Copyright" :content "Kevin Rosenberg 2002 <kevin@rosenberg.net>"))
11     ((:meta :name "description" :content "Lisp Markup Language Documentation"))
12     ((:meta :name "author" :content "Kevin Rosenberg"))
13     ((:meta :name "keywords" :content "Common Lisp, HTML, Markup Langauge")))
14
15    (:body
16     (:h1 "LML2 Documentation")
17     (:h2 "Overview")
18     (:p
19      ((:a :href "http://lml2.kpe.io") "LML2")
20      " is a Common Lisp package for generating HTML and XHTML documents."
21      " LML2 is based on:")
22     
23      (:ul
24       (:li ((:a :href "http://lml.kpe.io") "LML") " by "
25            ((:a :href "mailto:kevin@rosenberg.net") "Kevin Rosenberg"))
26       (:li "htmlgen by "
27            ((:a :href "http://www.franz.com") "Franz, Inc.")))
28
29      (:p
30       "The home page for LML2 is "
31       ((:a :href "http://lml2.kpe.io/") "http://lml2.kpe.io/")
32       ".")
33      
34      (:h2 "Prerequisites")
35      (:ul 
36       (:li ((:a :href "http://cliki.net/asdf") "ASDF"))
37       (:li ((:a :href "http://cliki.net/kmrcl") "KMRCL")))
38
39      (:h2 "Differences between LML2 and LML")
40      (:p "The syntax and HTML generation for LML2 are based on Franz's htmlgen macro. Personally, I like the syntax of LML better than LML2, but there are advantages of Franz's approach:")
41      (:ul
42       (:li "Faster compilation and runtime HTML generation")
43       (:li "Behavior of tags is extensible"))
44      
45      (:h2 "Differences between LML2 and htmlgen")
46      (:ul
47       (:li "LML2 is XHTML compatible with close tags so that (html :hr) now produces '&lt;hr /&gt;'")
48       (:li "Lowercase tag names so that (html ((:p class 'a))) now produces '&lt;p class=\"a\"&gt;&lt;/p&gt;")
49       (:li "Addition of new tags such as :insert-file, :nbsp, :jscript")
50       (:li "Removal of the if* macro from the htmlgen.lisp source code")
51       (:li "Incorporation of LML's standard site macro and other helper functions.")
52       (:li "Addition of special attribute tags (:if :when :optional :format :format")
53       (:li "Automatic quoting of attribute values for non-string values")
54       (:li "Post macroexpansion code walker to collape sequential write-string calls"))
55            
56      (:h2 "Installation")
57      (:p
58       "The easiest way to install LML is to use the "
59       ((:a :href "http://www.debian.org/") "Debian")
60       " GNU/Linux operating system. You can then use the command "
61       (:tt "apt-get install cl-lml2")
62       " to automatically download and install the LML2 package.")
63      (:p
64       "On a non-Debian system, you need to have "
65       ((:a :href "http://cclan.sourceforge.net/") "ASDF")
66       " installed to load the system definition file. You will need to change the source 
67        pathname in the system file to match the location where you have installed LML.")
68
69     (:h2 "Usage")
70     (:p
71      "Currently, there is no documentation on the functions provided by LML2. However, the source code is instructive and there are example files included in the LML2 package.")
72     
73     (:h2 "Examples")
74     ((:table :border 1 :cellpadding 3)
75      (:tbody
76       (:tr
77        ((:td :colspan 2 :style "color:#000;background-color:#ccc;font-weight:bold;")
78         "Iteration"))
79       (:tr
80        (:td 
81         (:pre
82 "(html
83    (:i \"The square of the first five integers are: \")
84    (:b (loop as x from 1 to 5 
85            doing (html " " (:princ (* x x))))))"))
86        (:td
87         (:i "The square of the first five integers are: ")
88         (:b (loop as x from 1 to 5 
89                 doing (html " " (:princ (* x x)))))))
90       ))
91     :hr
92     (:p
93      "View this page's "
94      ((:a :href "http://lml2.kpe.io/") "LML2")
95      " "
96      ((:a :href "readme.lml") "source")
97      ".")
98     )))