I'm trying to publish an org-project as html, and automate the task with the following org project definition:
(defconst home (file-name-directory (or load-file-name buffer-file-name)))
(require 'org-publish)
(setq org-publish-project-alist
'(
;; add all the components here
;; *notes* - publishes org files to html
("org-notes"
:base-directory (concat home "org/")
:base-extension "org" ; Filename suffix without dot
:publishing-directory (concat home "../public_html/")
:recursive t ; includes subdirectories
:publishing-function org-publish-org-to-html
:headline-levels 4 ; Just the default for this project.
:auto-preamble t
:auto-sitemap t ; generate automagically
:sitemap-filename "sitemap.org"
:sitemap-title "Sitemap"
)
;; *static* - copies files to directories
("org-static"
:base-directory (concat home "org/")
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
:publishing-directory (concat home "../public_html/")
:recursive t
:publishing-function org-publish-attachment
)
;; *publish* with M-x org-publish-project RET emacsclub RET
("emacsclub" :components ("org-notes" "org-static"))
))
However, upon exporting the project, I get the error
Wrong type argument: stringp, (concat home "org")
From an Elisp perspective, what the heck is going on? Isn't the output of concat a string? In which case why is this failing? I try stringp
on it's own with the concat argument and it returns true.
Something else I'm trying to get done, is have the whole project exported when this file gets evaluated. I've tried things like (command-execute org-publish-all) but it also complains of a wrong type argument. What can I use to get this done?