vulgo.el 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. (require 'org)
  2. (require 'ox-publish)
  3. (require 'ob-tangle)
  4. (require 'ox-html)
  5. (require 'ox-latex)
  6. (setq org-export-use-babel t)
  7. (org-babel-do-load-languages
  8. 'org-babel-load-languages
  9. '((shell . t)))
  10. (defun preamble-for-menu-lev1 (_plist)
  11. (with-temp-buffer (insert-file-contents "<LOCAL-PATH-TO-VULGO>/storie/menu.html")
  12. (insert-file-contents "<LOCAL-PATH-TO-VULGO>/preamble-lev1.html")
  13. (buffer-string)))
  14. (defun preamble-for-menu-lev0 (_plist)
  15. (with-temp-buffer (insert-file-contents "<LOCAL-PATH-TO-VULGO>/storie/menu-lev0.html")
  16. (insert-file-contents "<LOCAL-PATH-TO-VULGO>/preamble.html")
  17. (buffer-string)))
  18. (defun preamble-for-menu-lev0-eng (_plist)
  19. (with-temp-buffer (insert-file-contents "<LOCAL-PATH-TO-VULGO>/eng/stories/menu-lev0.html")
  20. (insert-file-contents "<LOCAL-PATH-TO-VULGO>/eng/preamble.html")
  21. (buffer-string)))
  22. (defun preamble-for-menu-lev1-eng (_plist)
  23. (with-temp-buffer (insert-file-contents "<LOCAL-PATH-TO-VULGO>/eng/stories/menu.html")
  24. (insert-file-contents "<LOCAL-PATH-TO-VULGO>/eng/preamble-lev1.html")
  25. (buffer-string)))
  26. (setq org-publish-project-alist
  27. '(
  28. ("vulgo-all" :components ("vulgo-it" "vulgo-en"))
  29. ("vulgo-it" :components ("vulgo-base" "vulgo-storie" "sitemap-to-menu" "vulgo-static"))
  30. ("vulgo-en" :components ("vulgo-base-eng" "vulgo-stories-eng" "sitemap-to-menu-eng" "vulgo-static"))
  31. ("vulgo-base"
  32. :base-directory "<LOCAL-PATH-TO-VULGO>"
  33. :base-extension "org"
  34. :publishing-directory "<EXPORT-PATH>/" ;; can be ssh with tramp
  35. :recursive nil
  36. :publishing-function org-html-publish-to-html
  37. :author "Agnese Trocchi"
  38. :email "ima@circex.org"
  39. :language "it"
  40. :section-numbers nil
  41. :with-toc t
  42. :html-head-include-default-style nil
  43. :html-head-include-scripts nil
  44. :html-preamble preamble-for-menu-lev0
  45. :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>")
  46. ("vulgo-base-eng"
  47. :base-directory "<LOCAL-PATH-TO-VULGO>/eng"
  48. :base-extension "org"
  49. :publishing-directory "<EXPORT-PATH>/en/" ;; can be ssh with tramp
  50. :recursive nil
  51. :publishing-function org-html-publish-to-html
  52. :author "Agnese Trocchi"
  53. :email "ima@circex.org"
  54. :language "it"
  55. :section-numbers nil
  56. :with-toc t
  57. :html-head-include-default-style nil
  58. :html-head-include-scripts nil
  59. :html-preamble preamble-for-menu-lev0-eng
  60. :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>")
  61. ("vulgo-storie"
  62. :base-directory "<LOCAL-PATH-TO-VULGO>/storie"
  63. :base-extension "org"
  64. :publishing-directory "<EXPORT-PATH>/storie" ;; can be ssh with tramp
  65. :exclude "menu.*"
  66. :recursive t
  67. :publishing-function org-html-publish-to-html
  68. :author "Agnese Trocchi"
  69. :email "ima@circex.org"
  70. :language "it"
  71. :with-toc t
  72. ;; Sitemap
  73. :auto-sitemap t
  74. :sitemap-title nil
  75. :sitemap-filename "sitemap.org"
  76. :html-head-include-default-style nil
  77. :html-head-include-scripts nil
  78. :html-preamble preamble-for-menu-lev1
  79. :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>")
  80. ("vulgo-stories-eng"
  81. :base-directory "<LOCAL-PATH-TO-VULGO>/eng/stories"
  82. :base-extension "org"
  83. :publishing-directory "<EXPORT-PATH>/en/stories" ;; can be ssh with tramp
  84. :exclude "menu.*"
  85. :recursive t
  86. :publishing-function org-html-publish-to-html
  87. :author "Agnese Trocchi"
  88. :email "ima@circex.org"
  89. :language "it"
  90. :with-toc t
  91. ;; Sitemap
  92. :auto-sitemap t
  93. :sitemap-title nil
  94. :sitemap-filename "sitemap.org"
  95. :html-head-include-default-style nil
  96. :html-head-include-scripts nil
  97. :html-preamble preamble-for-menu-lev1-eng
  98. :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>")
  99. ("sitemap-to-menu"
  100. :base-directory "<LOCAL-PATH-TO-VULGO>/storie/"
  101. :base-extension "org"
  102. :publishing-directory "<LOCAL-PATH-TO-VULGO>/storie/"
  103. :recursive nil
  104. :publishing-function org-html-publish-to-html
  105. :with-toc nil
  106. :with-author nil
  107. :with-creator nil
  108. :with-date nil
  109. :with-drawers nil
  110. :with-email nil
  111. :with-title nil
  112. :html-head-include-default-style nil
  113. :html-head-include-scripts nil
  114. :html-preamble nil
  115. :html-postamble nil
  116. :html-divs nil)
  117. ("sitemap-to-menu-eng"
  118. :base-directory "<LOCAL-PATH-TO-VULGO>/eng/stories/"
  119. :base-extension "org"
  120. :publishing-directory "<LOCAL-PATH-TO-VULGO>/eng/stories/"
  121. :recursive nil
  122. :publishing-function org-html-publish-to-html
  123. :with-toc nil
  124. :with-author nil
  125. :with-creator nil
  126. :with-date nil
  127. :with-drawers nil
  128. :with-email nil
  129. :with-title nil
  130. :html-head-include-default-style nil
  131. :html-head-include-scripts nil
  132. :html-preamble nil
  133. :html-postamble nil
  134. :html-divs nil)
  135. ("vulgo-static"
  136. :base-directory "<LOCAL-PATH-TO-VULGO>/"
  137. :base-extension "png\\|jpg\\|gif\\|css\\|js\\|pdf\\|mp3\\|ogg"
  138. :publishing-directory "<EXPORT-PATH>" ;; can be ssh with tramp
  139. :recursive t
  140. :publishing-function org-publish-attachment)))