Commit ba654931 authored by Dave Cooper's avatar Dave Cooper

added favicon to base-ajax-sheet, protect GWL publishing from crashing on missing directories.

parent 472b7eb8
......@@ -184,6 +184,8 @@ Default nil."
(use-x3dom? nil)
(include-default-favicon? t)
("String. The title of the web page. Defaults to \"Genworks GDL -\"
.followed by the strings-for-display."
......@@ -293,7 +295,8 @@ from a saved snapshot file."
((:html :lang "en")
(:head (:title (str (the title)))
(:meta :charset "UTF-8")
(:link :rel "icon" :type "image/x-icon" :href "/static/gwl/images/favicon.ico")
(when (the include-default-favicon?)
(htm (:link :rel "icon" :type "image/x-icon" :href "/static/gwl/images/favicon.ico")))
(when (the additional-header-content) (str (the additional-header-content)))
(write-the standard-javascript)
(when (the additional-header-js-content)
......
......@@ -26,25 +26,28 @@
(defun ensure-static-relative-pathname (relative)
(let ((pathname (merge-pathnames relative *static-home*)))
(or (probe-file pathname)
(warn "Required static subdirectory ~a does not appear to exist.~%" pathname))))
(warn "Expected static subdirectory ~a does not appear to exist.~%" pathname))))
(defun publish-images (server)
(publish-directory
:prefix "/images/gwl/"
:server server
:destination (namestring (ensure-static-relative-pathname "gwl/images/"))))
(let ((destination (ensure-static-relative-pathname "gwl/images/")))
(when destination (publish-directory
:prefix "/images/gwl/"
:server server
:destination (namestring destination)))))
(defun publish-statics (server)
(publish-directory
:prefix "/static/"
:server server
:destination (namestring (ensure-static-relative-pathname ""))))
(let ((destination (ensure-static-relative-pathname "")))
(when destination (publish-directory
:prefix "/static/"
:server server
:destination (namestring destination)))))
(defun publish-style (server)
(publish-directory
:prefix "/style/"
:server server
:destination (namestring (ensure-static-relative-pathname "gwl/style/"))))
(let ((destination (ensure-static-relative-pathname "gwl/style/")))
(when destination (publish-directory
:prefix "/style/"
:server server
:destination (namestring destination)))))
(dolist (func (list 'publish-images 'publish-statics 'publish-style))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment