- publishing free software manuals
The Org Mode 7 Reference Manual
by Carsten Dominik and others
Paperback (6"x9"), 282 pages
ISBN 9781906966089
RRP £9.95 ($14.95)

Sales of this book support the Org project! Get a printed copy>>>

13.3.2 Example: complex publishing configuration

This more complicated example publishes an entire website, including Org files converted to HTML, image files, Emacs Lisp source code, and style sheets. The publishing directory is remote and private files are excluded.

To ensure that links are preserved, care should be taken to replicate your directory structure on the web server, and to use relative file paths. For example, if your Org files are kept in ‘~/org’ and your publishable images in ‘~/images’, you would link to an image with


On the web server, the relative path to the image should be the same. You can accomplish this by setting up an "images" folder in the right place on the web server, and publishing images to it.

(setq org-publish-project-alist
     :base-directory "~/org/"
     :base-extension "org"
     :publishing-directory "/ssh:user@host:~/html/notebook/"
     :publishing-function org-publish-org-to-html
     :exclude "PrivatePage.org"   ;; regexp
     :headline-levels 3
     :section-numbers nil
     :table-of-contents nil
     :style "<link rel=\"stylesheet\"
             href=\"../other/mystyle.css\" type=\"text/css\"/>"
     :auto-preamble t
     :auto-postamble nil)

     :base-directory "~/images/"
     :base-extension "jpg\\|gif\\|png"
     :publishing-directory "/ssh:user@host:~/html/images/"
     :publishing-function org-publish-attachment)

     :base-directory "~/other/"
     :base-extension "css\\|el"
     :publishing-directory "/ssh:user@host:~/html/other/"
     :publishing-function org-publish-attachment)
    ("website" :components ("orgfiles" "images" "other"))))
ISBN 9781906966089The Org Mode 7 Reference ManualSee the print edition