diff options
author | Ludovic Court`es | 2006-07-21 13:33:30 +0000 |
---|---|---|
committer | Ludovic Court`es | 2006-07-21 13:33:30 +0000 |
commit | 272de5b9dc48596d0c3776cf3e9e7acf49655136 (patch) | |
tree | 1d0e5e74c0369562425df249b2c31e6a88c22796 /src/guile/skribilo/engine/html.scm | |
parent | c3c35546b401dd10fba2b5a7807d84d7f4440d09 (diff) | |
download | skribilo-272de5b9dc48596d0c3776cf3e9e7acf49655136.tar.gz skribilo-272de5b9dc48596d0c3776cf3e9e7acf49655136.tar.lz skribilo-272de5b9dc48596d0c3776cf3e9e7acf49655136.zip |
Added support for the `:keywords' option of `document' (Lout + HTML).
* NEWS: Mention it.
* doc/user/document.skb: Document it.
* doc/user/user.skb (document): Added keywords. Slightly modified the
introduction.
* src/guile/skribilo/engine/html.scm (document): Added `:keywords' to the
list of supported options.
(&html-head): Reformatted.
(&html-meta): New.
(&html-generic-document): Use it.
* src/guile/skribilo/engine/lout.scm: Document `pdf-keywords' as
deprecated.
(lout-pdf-docinfo): Check the `:keywords' option.
(document): Mention it as supported.
* src/guile/skribilo/skribe/api.scm (document): Added the `keywords'
option.
(keyword-list->comma-separated): New (stolen from Lout).
git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-20
Diffstat (limited to 'src/guile/skribilo/engine/html.scm')
-rw-r--r-- | src/guile/skribilo/engine/html.scm | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm index 4ba058a..15bea53 100644 --- a/src/guile/skribilo/engine/html.scm +++ b/src/guile/skribilo/engine/html.scm @@ -572,7 +572,7 @@ ;* document ... */ ;*---------------------------------------------------------------------*/ (markup-writer 'document - :options '(:title :author :ending :html-title :env) + :options '(:title :author :ending :html-title :env :keywords) :action (lambda (n e) (let* ((id (markup-ident n)) (title (new markup @@ -601,13 +601,23 @@ ;*---------------------------------------------------------------------*/ (markup-writer '&html-head :before (lambda (n e) - (printf "<head>\n") - (printf "<meta http-equiv=\"Content-Type\" content=\"text/html;") - (printf "charset=~A\">\n" (engine-custom (find-engine 'html) - 'charset))) + (printf "<head>\n") + (printf "<meta http-equiv=\"Content-Type\" content=\"text/html;") + (printf "charset=~A\">\n" (engine-custom (find-engine 'html) + 'charset))) :after "</head>\n\n") ;*---------------------------------------------------------------------*/ +;* &html-meta ... */ +;*---------------------------------------------------------------------*/ +(markup-writer '&html-meta + :before "<meta name=\"keywords\" content=\"" + :action (lambda (n e) + (let ((kw* (map ast->string (or (markup-body n) '())))) + (output (keyword-list->comma-separated kw*) e))) + :after "\">\n") + +;*---------------------------------------------------------------------*/ ;* &html-body ... */ ;*---------------------------------------------------------------------*/ (markup-writer '&html-body @@ -1190,12 +1200,20 @@ (class (markup-class n)) (parent n) (body (html-browser-title n)))) + (meta (new markup + (markup '&html-meta) + (ident (string-append id "-meta")) + (class (markup-class n)) + (parent n) + (body (markup-option n :keywords)))) (head (new markup (markup '&html-head) (ident (string-append id "-head")) (class (markup-class n)) + (options (the-options (list :keywords + (markup-option n :keywords)))) (parent n) - (body header))) + (body (list header meta)))) (ftnote (new markup (markup '&html-footnotes) (ident (string-append id "-footnote")) |