publish.el 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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-export-with-section-numbers nil
  12. org-export-with-smart-quotes t
  13. org-export-with-toc t
  14. org-export-with-todo-keywords t)
  15. (setf org-latex-image-default-width ""
  16. org-latex-table-scientific-notation "%s\\times10^{%s}"
  17. org-latex-prefer-user-labels t
  18. org-export-latex-hyperref-format "\\hyperref{%s}"
  19. org-latex-listings t
  20. org-latex-packages-alist '(("" "lmodern" nil)
  21. ("" "natbib" nil)
  22. ("" "csquotes" nil)
  23. ("" "color" nil)
  24. ("" "listings" nil)
  25. ("" "color" nil)
  26. ("UTF8" "inputenc" nil))
  27. org-latex-pdf-process '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
  28. "bibtex %b"
  29. "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
  30. "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
  31. (defvar site-attachments
  32. (regexp-opt '("jpg" "jpeg" "gif" "png" "svg"
  33. "ico" "cur" "css" "js" "woff" "html" "pdf")))
  34. (setq org-publish-project-alist
  35. (list
  36. (list "site-org"
  37. :base-directory "."
  38. :base-extension "org"
  39. :recursive t
  40. :publishing-function '(org-latex-publish-to-pdf)
  41. :publishing-directory "./public"
  42. :exclude (regexp-opt '("README" "draft")))
  43. (list "site" :components '("site-org"))))
  44. (setf org-confirm-babel-evaluate
  45. (lambda (lang body)
  46. (declare (ignorable lang body))
  47. nil))