publish.el 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ;; publish.el --- Publish org-mode project on Gitlab Pages
  2. ;; Author: Rasmus
  3. (package-initialize)
  4. (require 'org)
  5. (require 'ox-publish)
  6. (require 'ox-extra)
  7. (ox-extras-activate '(latex-header-blocks ignore-headlines))
  8. (setq org-publish-use-timestamps-flag nil)
  9. (setq user-full-name "Samuel W. Flint")
  10. (setq user-mail-address "swflint@flintfam.org")
  11. (setq org-todo-keywords '((sequence "TODO(t)" "WORKING(w)" "|" "DONE(d)")
  12. (sequence "REPORT(r)" "BUG(b)" "KNOWNCAUSE(k)" "|" "FIXED(f)")
  13. (sequence "|" "CANCELLED(c)")))
  14. (setq org-export-with-smart-quotes t
  15. org-export-with-toc t
  16. org-export-with-todo-keywords t)
  17. (setf org-latex-image-default-width ""
  18. org-latex-table-scientific-notation "%s\\times10^{%s}"
  19. org-latex-prefer-user-labels t
  20. org-export-latex-hyperref-format "\\hyperref{%s}"
  21. org-latex-listings t
  22. org-latex-packages-alist '(("" "lmodern" nil)
  23. ("" "natbib" nil)
  24. ("" "csquotes" nil)
  25. ("" "color" nil)
  26. ("" "listings" nil)
  27. ("" "color" nil)
  28. ("UTF8" "inputenc" nil))
  29. org-latex-pdf-process '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
  30. "bibtex %b"
  31. "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
  32. "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
  33. (defvar site-attachments
  34. (regexp-opt '("jpg" "jpeg" "gif" "png" "svg"
  35. "ico" "cur" "css" "js" "woff" "html" "pdf")))
  36. (setq org-publish-project-alist
  37. (list
  38. (list "site-org"
  39. :base-directory "."
  40. :base-extension "org"
  41. :recursive t
  42. :publishing-function '(org-latex-publish-to-pdf)
  43. :publishing-directory "./public"
  44. :exclude (regexp-opt '("README" "draft")))
  45. (list "site" :components '("site-org"))))
  46. (setf org-confirm-babel-evaluate
  47. (lambda (lang body)
  48. (declare (ignorable lang body))
  49. nil))