qbook

The HTML Generator 

(eval-when (:compile-toplevel :load-toplevel :execute)
  (yaclml:deftag-macro <qbook-page (&attribute title file-name (stylesheet "style.css")
                                               (printsheet "print.css")
                                               &body body)
    `(with-output-to-file (*yaclml-stream*
                           (ensure-directories-exist (merge-pathnames ,file-name (output-directory *generator*)))
                           :if-exists :supersede
                           :if-does-not-exist :create)
       (<:html
        (<:head
         (<:title (<:as-html ,title))
         (<:meta :http-equiv "Content-Type" :content "text/html; charset=utf-8")
         (<:stylesheet ,stylesheet)
         (<:link :rel "alternate stylesheet" :href ,printsheet :title "Print")
         (when (highlight-syntax *generator*)
           (<:link :rel "stylesheet"
                   :href "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.3/build/styles/default.min.css")))
        (<:body
         (<:div :class "qbook" ,@body)
         (when (highlight-syntax *generator*)
           (<:script :src "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.3/build/highlight.min.js")
           (<:script :src "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.3/build/languages/lisp.min.js")
           (<:script "hljs.initHighlightingOnLoad();"))
         )))))

Writing Comments 

Standard HTML stylesheets 

We include these as variables so that whene generating an html doc set we needn't know the location of qbook's source code.