Is there a way I can declare some HTML pre- and post-amble content in a buffer (and only applying to that buffer) itself without needing to create a new org-publish-project-alist project or customizing the default org-html-preamble and org-html-postamble?

1 Answer 1


The variables org-html-preamble and org-html-postamble (and org-html-postamble-format) are available to allow you to modify these components. This is explained in the org mode manual node (org) HTML preamble and postamble

If you set these variables as 'local variables', the changes will only apply to the current buffer. i.e., append the following to your .org file:

# Local Variables:
# org-html-preamble: "MY PREAMBLE \
#  which can span multiple lines, if we escape the newlines!\
#  literal newlines need to be inserted like this:\n Next line."
# End:

You will need to reload the file, or call M-x normal-mode, for this to take effect.


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.