If i have [[file:./test.org][test]] inside of example.org.

How can i achieve that i automatically export test.org to test.html, when i Export my Example.org to HTML?

Is there a Option i can enable to achieve this behavior?

I didn't find anything underneath Export-settings

1 Answer 1


Publishing multiple html files in org: https://orgmode.org/manual/Publishing.html#Publishing

If we assume that your org files reside in ~/tmp, then you can export them in one go with C-c C-e P p after evaluating below definition

(setq org-publish-project-alist
     :base-directory "~/tmp"
     :base-extension "org"
     :publishing-directory "~/tmp/html"
     :publishing-function org-html-publish-to-html
    ("example" :components ("org-files"))

They will be exported to the directory ~/tmp/html.

Alternatively - maybe rethinking your approach - you could importing the content of "test.org" directly into your "example.org" html export with an #+include directive: https://orgmode.org/manual/Include-files.html.

#+INCLUDE: "test.org"

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.