1

As a follow up to this question: superuser question 431356

How can I specify org mode publish setting globally? So not per project, but for any .org file I happen to publish?

so instead of:

 (setq org-publish-project-alist
  '(("Homepage"
  :base-directory "~/git/homepage/"
  :base-extension "org"
  :publishing-directory "~/public_html/"
  :publishing-function org-publish-org-to-html
  :style "<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\" />")))

or this for every file:

 #+STYLE: <link rel="stylesheet" type="text/css" href="stylesheet.css" />

I want something that changes the defaults of any org file.

reinier
  • 261
  • 3
  • 10

2 Answers2

3

You can customize org-export-html-style and org-export-html-style-extra.

The first has all the default values for org export, so you'd better leave as is unless you want to override everything.

org-export-html-style-extra gets appended after the default style definition with your own variations.

I use this setting:

"<style type=\"text/css\">\n  html {\n  font-family: sans-serif;\n  font-size: 11pt;\n  }\n  em { font-style: normal; font-weight: bold;}\n</style>"
Juancho
  • 2,652
0

Juancho's answer worked for me, with one change: when going through the org-mode customization menu (Customize > Export > HTML > Style Extras) I had to remove the \n and escape characters.

Tom Slee
  • 113