1

I have an org file with the following code block:

#+begin_src emacs-lisp
(+ 1 2)
#+end_src

And when I export it using M-x org-html-export-to-html, the code blocks in the generated file have no color.

They have a src and a src-emacs-lisp CSS classes, but the only thing inside the file is:

pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }

I have org-src-fontify-natively set to t, and I tried using both css and inline-css as values for org-html-htmlize-output-type, but nothing fixed it.

I remember exporting as HTML some months ago in a different machine, and the code blocks had color.

1 Answer 1

2

Install htmlize package with M-x package-install RET htmlize RET.

Org export uses htmlize to highlight code blocks in html.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.