123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- (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 "<LOCAL-PATH-TO-VULGO>/storie/menu.html")
- (insert-file-contents "<LOCAL-PATH-TO-VULGO>/preamble-lev1.html")
- (buffer-string)))
- (defun preamble-for-menu-lev0 (_plist)
- (with-temp-buffer (insert-file-contents "<LOCAL-PATH-TO-VULGO>/storie/menu-lev0.html")
- (insert-file-contents "<LOCAL-PATH-TO-VULGO>/preamble.html")
- (buffer-string)))
- (defun preamble-for-menu-lev0-eng (_plist)
- (with-temp-buffer (insert-file-contents "<LOCAL-PATH-TO-VULGO>/eng/stories/menu-lev0.html")
- (insert-file-contents "<LOCAL-PATH-TO-VULGO>/eng/preamble.html")
- (buffer-string)))
- (defun preamble-for-menu-lev1-eng (_plist)
- (with-temp-buffer (insert-file-contents "<LOCAL-PATH-TO-VULGO>/eng/stories/menu.html")
- (insert-file-contents "<LOCAL-PATH-TO-VULGO>/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 "<LOCAL-PATH-TO-VULGO>"
- :base-extension "org"
- :publishing-directory "<EXPORT-PATH>/" ;; 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 "<div class='footer'><ul><li><a href='privacy.html'>Privacy</a></li><li><a href='cookies.html'>Cookies</a></li><li><a href='contacts.html'>Contacts</a></li><li><a href='vulgo.html'>Vulgo</a></li><li><a href='credits.html'>Credits</a></li></ul></div>")
- ("vulgo-base-eng"
- :base-directory "<LOCAL-PATH-TO-VULGO>/eng"
- :base-extension "org"
- :publishing-directory "<EXPORT-PATH>/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 "<div class='footer'><ul><li><a href='../privacy.html'>Privacy</a></li><li><a href='../cookies.html'>Cookies</a></li><li><a href='contacts.html'>Contacts</a></li><li><a href='vulgo.html'>Vulgo</a></li><li><a href='credits.html'>Credits</a></li></ul></div>")
- ("vulgo-storie"
- :base-directory "<LOCAL-PATH-TO-VULGO>/storie"
- :base-extension "org"
- :publishing-directory "<EXPORT-PATH>/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 "<div class='footer'><ul><li><a href='../../privacy.html'>Privacy</a></li><li><a href='../../cookies.html'>Cookies</a></li><li><a href='../../contacts.html'>Contacts</a></li><li><a href='../../vulgo.html'>Vulgo</a></li><li><a href='../../credits.html'>Credits</a></li></ul></div>")
- ("vulgo-stories-eng"
- :base-directory "<LOCAL-PATH-TO-VULGO>/eng/stories"
- :base-extension "org"
- :publishing-directory "<EXPORT-PATH>/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 "<div class='footer'><ul><li><a href='../../../privacy.html'>Privacy</a></li><li><a href='../../../cookies.html'>Cookies</a></li><li><a href='../../contacts.html'>Contacts</a></li><li><a href='../../vulgo.html'>Vulgo</a></li><li><a href='../../credits.html'>Credits</a></li></ul></div>")
- ("sitemap-to-menu"
- :base-directory "<LOCAL-PATH-TO-VULGO>/storie/"
- :base-extension "org"
- :publishing-directory "<LOCAL-PATH-TO-VULGO>/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 "<LOCAL-PATH-TO-VULGO>/eng/stories/"
- :base-extension "org"
- :publishing-directory "<LOCAL-PATH-TO-VULGO>/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 "<LOCAL-PATH-TO-VULGO>/"
- :base-extension "png\\|jpg\\|gif\\|css\\|js\\|pdf\\|mp3\\|ogg"
- :publishing-directory "<EXPORT-PATH>" ;; can be ssh with tramp
- :recursive t
- :publishing-function org-publish-attachment)))
|