(require 'org) (require 'ox-publish) (require 'ob-tangle) (require 'ox-html) (require 'ox-latex) (setq org-export-use-babel t) (org-babel-do-load-languages 'org-babel-load-languages '((shell . t))) (defun preamble-for-menu-lev1 (_plist) (with-temp-buffer (insert-file-contents "/storie/menu.html") (insert-file-contents "/preamble-lev1.html") (buffer-string))) (defun preamble-for-menu-lev0 (_plist) (with-temp-buffer (insert-file-contents "/storie/menu-lev0.html") (insert-file-contents "/preamble.html") (buffer-string))) (defun preamble-for-menu-lev0-eng (_plist) (with-temp-buffer (insert-file-contents "/eng/stories/menu-lev0.html") (insert-file-contents "/eng/preamble.html") (buffer-string))) (defun preamble-for-menu-lev1-eng (_plist) (with-temp-buffer (insert-file-contents "/eng/stories/menu.html") (insert-file-contents "/eng/preamble-lev1.html") (buffer-string))) (setq org-publish-project-alist '( ("vulgo-all" :components ("vulgo-it" "vulgo-en")) ("vulgo-it" :components ("vulgo-base" "vulgo-storie" "sitemap-to-menu" "vulgo-static")) ("vulgo-en" :components ("vulgo-base-eng" "vulgo-stories-eng" "sitemap-to-menu-eng" "vulgo-static")) ("vulgo-base" :base-directory "" :base-extension "org" :publishing-directory "/" ;; can be ssh with tramp :recursive nil :publishing-function org-html-publish-to-html :author "Agnese Trocchi" :email "ima@circex.org" :language "it" :section-numbers nil :with-toc t :html-head-include-default-style nil :html-head-include-scripts nil :html-preamble preamble-for-menu-lev0 :html-postamble "") ("vulgo-base-eng" :base-directory "/eng" :base-extension "org" :publishing-directory "/en/" ;; can be ssh with tramp :recursive nil :publishing-function org-html-publish-to-html :author "Agnese Trocchi" :email "ima@circex.org" :language "it" :section-numbers nil :with-toc t :html-head-include-default-style nil :html-head-include-scripts nil :html-preamble preamble-for-menu-lev0-eng :html-postamble "") ("vulgo-storie" :base-directory "/storie" :base-extension "org" :publishing-directory "/storie" ;; can be ssh with tramp :exclude "menu.*" :recursive t :publishing-function org-html-publish-to-html :author "Agnese Trocchi" :email "ima@circex.org" :language "it" :with-toc t ;; Sitemap :auto-sitemap t :sitemap-title nil :sitemap-filename "sitemap.org" :html-head-include-default-style nil :html-head-include-scripts nil :html-preamble preamble-for-menu-lev1 :html-postamble "") ("vulgo-stories-eng" :base-directory "/eng/stories" :base-extension "org" :publishing-directory "/en/stories" ;; can be ssh with tramp :exclude "menu.*" :recursive t :publishing-function org-html-publish-to-html :author "Agnese Trocchi" :email "ima@circex.org" :language "it" :with-toc t ;; Sitemap :auto-sitemap t :sitemap-title nil :sitemap-filename "sitemap.org" :html-head-include-default-style nil :html-head-include-scripts nil :html-preamble preamble-for-menu-lev1-eng :html-postamble "") ("sitemap-to-menu" :base-directory "/storie/" :base-extension "org" :publishing-directory "/storie/" :recursive nil :publishing-function org-html-publish-to-html :with-toc nil :with-author nil :with-creator nil :with-date nil :with-drawers nil :with-email nil :with-title nil :html-head-include-default-style nil :html-head-include-scripts nil :html-preamble nil :html-postamble nil :html-divs nil) ("sitemap-to-menu-eng" :base-directory "/eng/stories/" :base-extension "org" :publishing-directory "/eng/stories/" :recursive nil :publishing-function org-html-publish-to-html :with-toc nil :with-author nil :with-creator nil :with-date nil :with-drawers nil :with-email nil :with-title nil :html-head-include-default-style nil :html-head-include-scripts nil :html-preamble nil :html-postamble nil :html-divs nil) ("vulgo-static" :base-directory "/" :base-extension "png\\|jpg\\|gif\\|css\\|js\\|pdf\\|mp3\\|ogg" :publishing-directory "" ;; can be ssh with tramp :recursive t :publishing-function org-publish-attachment)))