I have this basic org publishing project to test that code blocks evaluation is triggered by publishing in html (org-html-publish-to-html). While exporting through org-mode export dispatcher does evaluate code blocks automatically, publishing does not.
Here the content of the only file of the project, test.org:
#+NAME: ls #+BEGIN_SRC sh :export results echo $(ls) #+END_src #+RESULTS: ls
I publish the website running:
emacs --batch --no-init-file --load publish.el --funcall org-publish-all
(package-initialize) ;(require 'org) (require 'ob-tangle) (require 'ox-publish) (require 'ox-latex) (require 'ox-html) (setq org-confirm-babel-evaluate nil) ; don't ask for confirmation before evaluating a code block (setq org-export-babel-evaluate t) (setq org-export-use-babel t) (setq org-publish-project-alist `(("test" :recursive t :base-directory "." :base-extension "org" :publishing-directory "./public" :publishing-function org-html-publish-to-html :section-numbers nil ) ))
(I also tried :
results html and
:results output with no more luck)
This is a toy test because I ran into the problem while building a website. I didn't see anywhere that publishing would not evaluate code, anyone has any info on that ?
It has been seen locally on my laptop as well as on a distant gitlab repo, the publishing process being ran on the distant git server.
GNU Emacs 24.5.1 / Org mode version 9.0.3 / Debian Jessie