1 ;;; muse-init.el --- Use Emacs Muse to publish ikiwiki documents
3 ;; The code in this file may be used, distributed, and modified
4 ;; without restriction.
8 (add-to-list 'load-path
(expand-file-name "~ikiwiki/elisp/muse/lisp"))
11 (require 'muse
) ; load generic module
12 (require 'muse-html
) ; load (X)HTML publishing style
13 (require 'muse-project
) ; load support for projects
14 (require 'muse-wiki
) ; load Wiki support
19 (muse-derive-style "ikiwiki" "xhtml"
24 (defvar muse-ikiwiki-project
"HCoopWiki"
25 "Name of the project to publish using ikiwiki.")
26 (defvar muse-ikiwiki-source
"/afs/hcoop.net/common/ikiwiki/repo"
27 "Source directory for Muse files.")
28 (defvar muse-ikiwiki-dest
"/afs/hcoop.net/common/ikiwiki/dest"
29 "Destination directory for published files.")
32 (setq muse-project-alist
33 `((,muse-ikiwiki-project
34 (,@(muse-project-alist-dirs muse-ikiwiki-source
))
35 ;; Publish this directory and its subdirectories. Arguments
36 ;; are as follows. The above `muse-project-alist-dirs' part
38 ;; 1. Source directory
39 ;; 2. Output directory
40 ;; 3. Publishing style
41 ;; remainder: Other things to put in every generated style
42 ,@(muse-project-alist-styles muse-ikiwiki-source
47 (setq muse-wiki-allow-nonexistent-wikiword t
48 muse-wiki-match-all-project-files t
49 muse-wiki-interwiki-delimiter
"::")
50 (add-to-list 'muse-publish-desc-transforms
'muse-wiki-publish-pretty-interwiki
)
51 (add-to-list 'muse-publish-desc-transforms
'muse-wiki-publish-pretty-title
)
52 (setq muse-wiki-interwiki-alist
53 '(("EmacsWiki" .
"http://www.emacswiki.org/cgi-bin/wiki/")
54 ("UbuntuLinux" .
"http://ubuntulinux.org/")))
56 ;; Permitted modes for <src> to colorize
57 (setq muse-html-src-allowed-modes
58 '("ada" "apache" "asm" "awk" "c++" "c" "cc" "change-log" "context"
59 "css" "diary" "diff" "dns" "domtool" "emacs-lisp" "f90" "fortran"
60 "fundamental" "html" "java" "jython" "latex" "lisp" "lua" "m4"
61 "makefile" "markdown" "matlab" "maxima" "message" "modula-2" "muse"
62 "nroff" "octave" "org" "outline" "pascal" "perl" "ps" "python" "rst"
63 "ruby" "scheme" "sgml" "sh" "slang" "sml" "sml-cm" "sml-lex" "sml-yacc"
64 "sql" "tcl" "tex" "texinfo" "xml" "zone"))
65 ;; In case someone does <src lang="muse">
66 (setq muse-colors-evaluate-lisp-tags nil
67 muse-colors-inline-images nil
)
68 ;; In case someone does <src lang="org">
70 (setq org-inhibit-startup t
71 org-table-formula-evaluate-inline nil
)
73 ;; Don't allow dangerous tags to be published
74 (setq muse-publish-enable-dangerous-tags nil
)
78 (defun muse-ikiwiki-publish (file &optional force
)
79 "Publish a single file for ikiwiki."
80 (if (not (stringp file
))
81 (message "Error: No file given to publish")
82 (let* ((project (muse-project muse-ikiwiki-project
))
83 (styles (and project
(cddr project
)))
84 (muse-current-project project
)
85 (muse-batch-publishing-p t
))
87 (message "Error: project `%s' does not exist" muse-ikiwiki-project
)
88 (muse-project-publish-file file styles force
)))))
93 '(muse-html-charset-default "utf-8")
94 '(muse-html-encoding-default (quote utf-8
))
95 '(muse-html-meta-content-encoding (quote utf-8
))
96 '(muse-publish-comments-p t
)
97 '(muse-publish-date-format "%b. %e, %Y"))
99 '(muse-bad-link ((t (:foreground
"DeepPink" :underline
"DeepPink" :weight bold
)))))
106 ;;; muse-init.el ends here